com.jtransc.util.exec.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-utils Show documentation
Show all versions of jtransc-utils Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
package com.jtransc.util
import com.jtransc.text.captureStdout
object ClassUtils {
@JvmStatic fun callMain(clazz: Class, vararg args: String): String {
com.jtransc.log.log("Executing: " + clazz.name + ".main()")
val result = captureStdout {
val m = clazz.getDeclaredMethod("main", Array::class.java)
m.invoke(null, args as Any)
}
com.jtransc.log.log("Result: " + result)
return result
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy