PDA

View Full Version : how to return to command after running a java class



provisional_idiot
February 14th, 2008, 12:08 AM
so basically in the terminal i want to run a java class multiple times without having to restart the terminal.... which is to say that whenever i run a java class from the terminal the command prompt doesnt return like it does, say, after a bash program finishes executing:

root@comp:#java someclass.java [ENTER]

the program runs but root@comp:# doesnt return


can this be accomplished?? thanks

LaRoza
February 14th, 2008, 12:41 AM
It must not stop for some reason, try hitting Ctrl + z to end it.

LittleLORDevil
February 14th, 2008, 03:52 AM
In the end of the code when you want it to be finished add the line:

System.exit(-1);

Zugzwang
February 14th, 2008, 12:36 PM
Is it possible that you are searching for the "&" symbol? Just try:


java someclass.java &