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.
Asked
Active
Viewed 558 times
0
-
Please share the command line used to start the app. – LMC May 02 '19 at 02: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 02 '19 at 03:06
-
`javaws name.jnlp > app.log 2&>1` should work assuming your OS is Linux. – LMC May 02 '19 at 03:17
-
@LuisMuñoz sorry should have specified, crash is occurring on Windows 10 – CodeCamper May 02 '19 at 03:20
-
Check [this answer](https://stackoverflow.com/a/11992492/2834978). – LMC May 02 '19 at 23:40
1 Answers
0
Please add this in while starting java -XX:ErrorFile=filename%p.log.

RAJKUMAR NAGARETHINAM
- 1,408
- 1
- 15
- 26
-
where will the log file save? I do not see it in the program directory? – CodeCamper May 02 '19 at 03:12
-
you can specify the full path where wanted to save the file – RAJKUMAR NAGARETHINAM May 02 '19 at 03: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 02 '19 at 03:17