简体   繁体   中英

Java Web Start doesn't launch my .jar without enabling the “show console”

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM