[ACCEPTED]-Compile a Java file... with a Java program-compilation
Accepted answer
In Java 6 and onwards there is an API to 6 use the compiler. This might be what you 5 are looking for.
http://www.javabeat.net/2007/04/the-java-6-0-compiler-api/
http://docs.oracle.com/javase/6/docs/api/javax/tools/JavaCompiler.html
Note that you need a JDK 4 to have the compiler available. JRE will 3 not be enough. If that is a problem consider 2 embedding the Eclipse Java compiler in your 1 application.
Java 6 has a Compiler API Check out Java 1 Compiler Class Javadoc
http://docs.oracle.com/javase/6/docs/api/javax/tools/JavaCompiler.html
and an example
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.