Suppose I have a class which has a main method like below and that hoge.hoge()
takes long time to complete.
public static void main(String[] args){
hoge.hoge();
}
This application will be executed from the command line. I would like the application to immediately become a background task, exactly as if someone had executed:
java AboveClass &
I.e. the user should be returned back to the prompt. Is there a way I can achieve this in Java?