I am running a java web start application. It crashes on start up. There's lots of useful information in the java console. However, once WebStart crashes, the console window closes and all my lovely logging information is gone. I haven't been able to find a way to capture that log info.
The web server, that's providing the web start code, delivers a file to the mac. I start the java app by clicking on the file. The splash screen comes up and then it crashes. Is there a simple way, with out changing the code in the java app to force the redirection of that output stream to a log file somewhere? I haven't been able to find any documentation that says this is possible.
I want all the information that gets printed to the java web start console screen, but in a file.
Open the Java control panel
Click on the Advanced tab
Under Debugging, enable tracing and logging
Run your JWS application (javaws -viewer is easy if it's already downloaded)
Let it crash or whatever
Find your log file in ~/Library/Application\ Support/Oracle/Java/Deployment/log
Related
As stated in the title, my software won't launch unless the "Show console" option is selected in Java settings. I'm not sure what kind of code you'd like me to post, so please ask.
When I try to run it, the Java dialog pops up and the progress bar that loads the software completes before it closes. When the console is up, the software finally loads and displays afterwards. Without the console, nothing happens.
I've tried to run the web start on different computers, and they all had the same problem. The console doesn't print out any error messages, so I don't have anything to use for debugging the problem.
Some information about the software:
It's a JavaFX project, compiled using Oracle jdk 1.7.0_65 on OS X with Netbeans. It requires full security permission, and all jars (I use a bunch of libraries) are being signed using a key store from a trusted vendor.
EDIT
I tried to launch my program through console using the following command: javaws -viewer http://www.website.com/software.jnlp, and - without launching my software - it returned the following result to the terminal:
java.lang.NullPointerException
at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:1003)
at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:998)
at sun.awt.SunToolkit.getSystemEventQueueImpl(SunToolkit.java:993)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1749)
at java.awt.EventQueue.invokeLater(EventQueue.java:1245)
at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1290)
at com.oracle.deploy.update.UpdateCheck.updateStateChange(Unknown Source)
Could this be of any help?
For others who might have this problem, this is what caused it for me:
I had a thread running in the background that would show the stage once it was done loading all the assets. This stopped the whole thing from executing, so I had to change the loading logic inside of my code instead to allow for the primary stage to use the show-method in the UI-thread.
I configured Netbeans to run a program with Java Web Start.
The program compiles fine, but then when it runs, it tries to load a file (a sound clip) that was not in the place it expected to find it in. Here Java Web Start just pauses. It doesn't show me any errors, either in the output tab of Netbeans, or in the Java Console (which is what it shows me when I open the html page and run it as an applet).
Any idea how I can configure things so that errors are displayed?
Whenever you deal with Java WebStart it is really nice to enable the Java Console (see Control Panel -> Java under Windows), and turn on full debug log.
Am I right in assuming you are looking for a stack trace?
I'm trying to debug a locally running java web start application. There is a call failing that I am trying to get a stack trace for, but it appears that nothing is ever getting printed out anywhere. The app just appears to be doing nothing.
Thanks!
Logging java console output
How do I pipe the Java console output to a file?
From the Control Panel in Windows you can start the Java control panel app. Then click on the "Advanced" tab, select "Java Console" and the select "Show Console". The stack trace will now appear in the console. I believe the console allows you to save the file to disk if you want.
Is it possible to debug the applet loading process of the java plugin?
I don't want to debug my applet application, I want to debug the applet loading process of the java plugin2. I mean the jnlp/jar download, cache lookup, certificate check, etc. I know the java plugin is not open source, but it would help anyway.
I'm trying to solve JNLP2ClassLoader issues happening only within IE. It works with Google Chrome or Firefox. The error is not very reproducible, but one of the is "JNLP2ClassLoader.findClass: org.apache.log4j.spi.ThrowableInformation: try again...".
You can set the log level to trace, pressing 5 anytime in the java plugin console. Configure the plugin to open the console automatically and press 5 as soon as it opens. this will print a bunch of stuff that can or cannot be useful to you.
I know you can with eclipse if you put a breakpoint somewhere in one of the init methods. You should be able to run an applet from your debugger without needing a webpage.
I've never done a Java Web start application before. I wrote my app's JNLP files and published them along with all the JARs to my Web server. However, after getting the initial splash screen where JWS loads the libraries, nothing happens. Do you have any suggestions on how to debug this, perhaps get some console output? I've tried cleaning the cache through "javaws -uninstall" but it doesn't help.
Any suggestion is appreciated.
In the Java Console you should enable full tracing and logging. This will tell you a lot about what happens under the covers when Web Start doesn't work.
See http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/tracing_logging.html
Hopefully this can get you started.
In the Java Control Panel, select Advanced > Java console > Show console. You will probably see some exception output. If the process is still running, you should be able to find it with jps from the command line.
Did you check the task manager to see if it had actually launched?
In my experience with a similar problem, the program itself was actually running, but it wasn't able to display anything.