Gunslingor
09/16/2019, 12:13 PMpackage org.ppp.installer
object JavaGetProperty {
@JvmStatic
fun main(args: Array<String>) {
try {
val property = args.getOrNull(0)
var propertyVal: String
if (property == "java_patch") {
//Custom Properties
val fullVersion = System.getProperty("java.version", "unknown")
propertyVal = fullVersion.split("_")[1]
} else {
//Direct Unprocessed Properties
propertyVal = if (property != null) System.getProperty(property, "unknown") else "unknown"
}
print(propertyVal.trim())
} catch (e: Exception) {
print("unknown")
}
}
}
tapchicoma
09/16/2019, 12:42 PMGunslingor
09/16/2019, 12:52 PMtapchicoma
09/16/2019, 1:08 PMGunslingor
09/16/2019, 1:08 PMtapchicoma
09/16/2019, 6:27 PMGunslingor
09/16/2019, 6:27 PMtapchicoma
09/16/2019, 6:29 PMkotlin
contains standard library. You could remove it by either dependence on stdlib or use tools like proguardGunslingor
09/16/2019, 6:30 PM