i am in need of advice and help regarding the java compiler and
i am currently working on a project (a simple tutoring system in
java). i wanted to know and/or learn a way on how to include the java
compiler and interpreter within the program i am developing right now.
for example i have two buttons, one that compiles and one that runs a
is there any code, way(s) or method(s) that makes this possible?
you can use Runtime class for such tasks(I am sure,though did not run a java command using this)
Runtime process = Runtime.getRunTime().exec("javac className.java >ouput.log");
something along those lines, I did not text the code.It should run the javac command(to compile the code) and then it should put the out put in the output.log file.Which you can read by File object etc..etc..