JEP 330 (Launch Single-File Source-Code Programs) is a jdk enhancement project that "Enhances the java launcher to run a program supplied as a single file of Java source code"
it's part of java 11 and it works with kilim
cp=$(mvn -q dependency:build-classpath -Dmdep.outputFile=/dev/fd/1)
kilim="-javaagent:${cp/:*} -cp $cp"
$java11/bin/java $kilim ../../src/kilim/examples/Xorshift.java
currently, the JEP 330 classloader doesn't provide getResource, so i use a javaagent to access the bytecode. but openjdk is committed to implementing that method
so by the time java 11 is released we'll have full support with only needing to supply the classpath
this is available in maven central as org.db4j : kilim : 2.0.0-22-jdk11