pgreze
02/04/2021, 7:57 AMSystem.getProperties()["sun.java.command"].toString().split(" ").let {
it[it.indexOfLast { item -> item == "-script" } + 1]
}
but it’s not handling well escaped spaces + quite verbose. In Python you would find it with sys.argv[0]