Sunday, February 6, 2011

Run .jar file with log

Use the following command to run jar file for logging errors.

nohup java -jar -Xms1024m -Xmx2048m Test.jar &

Above command will run the "Test.jar" file in background and produce error file called "nohup" in same directory. ( All system out prints will be redirected into this file). So, developers can catch errors using the "nohup".

No comments:

Post a Comment