Compile/Execute code in Java app
Hi, I am writing a Java application and i need help. So, what i want to do is to compile and execute the code in a JTextArea which also shows errors(if any) on the screen. However, I also want to check that the code and the output of the program are correct, in the same way as on the Javala website. So, if the code and the output for a given exercise are correct, a message saying "Your program works correctly, exercise completed!" would appear on the screen. I have heard about the compiler class but I am unsure how to use it. Any ideas?
Help is greatly appreciated.