0

I have enable tracing and logging and show console enabled but the program I am using is crashing Java in a matter of minutes, is there anyway I can save the log directly to a file so when it crashes I can see what the last error was that was causing this? Also I have no access to the source code of this program.

5
  • Please share the command line used to start the app.
    – LMC
    May 2, 2019 at 2:57
  • @LuisMuñoz javaws name.jnlp it launches with the console so I can read the logs but when it crashes the log disappears with it so I miss the last few errors or hints as to what is happening.
    – CodeCamper
    May 2, 2019 at 3:06
  • javaws name.jnlp > app.log 2&>1 should work assuming your OS is Linux.
    – LMC
    May 2, 2019 at 3:17
  • @LuisMuñoz sorry should have specified, crash is occurring on Windows 10
    – CodeCamper
    May 2, 2019 at 3:20
  • Check this answer.
    – LMC
    May 2, 2019 at 23:40

1 Answer 1

0

Please add this in while starting java -XX:ErrorFile=filename%p.log.

3
  • where will the log file save? I do not see it in the program directory?
    – CodeCamper
    May 2, 2019 at 3:12
  • you can specify the full path where wanted to save the file May 2, 2019 at 3:13
  • I tried "javaws name.jnlp -XX:ErrorFile=c:\filename%p.log" and I am not getting any output to my C drive... the program crashes pretty often.
    – CodeCamper
    May 2, 2019 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.