CodeExplorer Posted November 17, 2017 Posted November 17, 2017 Java Compilers Some time ago I've searched over NET for java compilers, then without good results, Now I've found some: https://blogs.oracle.com/sundararajan/week-end-fun-with-the-java-compiler-source-code https://en.wikipedia.org/wiki/Javac http://janino-compiler.github.io/janino/ https://github.com/janino-compiler/janino https://stackoverflow.com/questions/616532/on-the-fly-in-memory-java-code-compilation-for-java-5-and-java-6 https://commons.apache.org/proper/commons-jci/ jci seems tom be the winner, trough is a bit outdated. 1
3dsboy08 Posted November 18, 2017 Posted November 18, 2017 Isn't there that commercial Java compiler also that compiles to native code? I think its located here: https://www.excelsiorjet.com/ You should add it to the list. 1
CodeExplorer Posted December 8, 2017 Author Posted December 8, 2017 Seems you can use this code directly from java:https://stackoverflow.com/questions/1320476/execute-another-jar-in-a-java-program String fileToCompile = "/Users/rupas/VolatileExample.java"; JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); int compilationResult = compiler.run(null, null, null, fileToCompile); if (compilationResult == 0) { System.out.println("Compilation is successful"); } else { System.out.println("Compilation Failed"); }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now