java-web-start

Do I have to explicitly call System.exit() in a Webstart application?

≡放荡痞女 提交于 2019-12-01 03:47:00
Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application's JVM did not terminate. The thread dump showed that there are a couple of non-daemon threads, notably Swing's EDT, AWT and a couple of websart related threads. The actual strategy used is that each window increments a counter when it is created and decrements one when it is closed. The default close operation is DISPOSE_ON_CLOSE. Wen the counter reaches zero, I stop all threadpools and release all JNI resources. When I launched the

package javax.jnlp is declared in module java.jnlp, which is not in the module graph

…衆ロ難τιáo~ 提交于 2019-12-01 03:35:35
I have a project that uses Java webstart technology. I decided to upgrade the Java version from 8 to 9. However, I faced the following error on compiling: error: package javax.jnlp is not visible import javax.jnlp.DownloadServiceListener; ^ (package javax.jnlp is declared in module java.jnlp, which is not in the module graph) I tried to include C:\Program Files\Java\jdk-9\lib\javaws.jar to the classpath, but still the same issue remains. It looks like java.jnlp is not resolved by default for code on the class path (much like Java EE modules ). The solution is to add it explicitly with --add

Enabling JVM options with Java Web Start / JNLP

佐手、 提交于 2019-12-01 03:34:23
I'm creating a Web Start application which would benefit from some of the newer JVM options (especially escape analysis, G1 garbage collector etc.) At the same time, I would like the application to work gracefully on older JVMs that do not support these options. Is there a good way of achieving this? David J. Liszewski As Thorbjørn mentioned, Java 6 u10 allows multiple j2se elements in JNLP. The JNLP File Syntax resources section of the latest Java Web Start Developer's Guide , indicates that multiple j2se elements, each with java-vm-args attributes can be specified with the most preferred

Do I have to explicitly call System.exit() in a Webstart application?

╄→гoц情女王★ 提交于 2019-12-01 00:30:35
问题 Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application's JVM did not terminate. The thread dump showed that there are a couple of non-daemon threads, notably Swing's EDT, AWT and a couple of websart related threads. The actual strategy used is that each window increments a counter when it is created and decrements one when it is closed. The default close operation is DISPOSE_ON_CLOSE. Wen the

Enabling JVM options with Java Web Start / JNLP

一世执手 提交于 2019-11-30 23:58:28
问题 I'm creating a Web Start application which would benefit from some of the newer JVM options (especially escape analysis, G1 garbage collector etc.) At the same time, I would like the application to work gracefully on older JVMs that do not support these options. Is there a good way of achieving this? 回答1: As Thorbjørn mentioned, Java 6 u10 allows multiple j2se elements in JNLP. The JNLP File Syntax resources section of the latest Java Web Start Developer's Guide , indicates that multiple j2se

How to use SQLite database inside jar file?

浪子不回头ぞ 提交于 2019-11-30 23:36:35
问题 I can't figure out how to include a SQLite database within a Java .jar file for deployment (via Java WebStart). The database does not need to be updated at runtime... it is essentially a glorified configuration file. Using Eclipse, by the way. 回答1: Another good option to consider could be derby, javadb. It's bundled with java now and is pretty fast to setup and has good performances. Regards, Stéphane 回答2: SQLite requires the separate files because of how the engine ensures locking and ACID.

Java Web Start NumberFormatException while running Jar application

自古美人都是妖i 提交于 2019-11-30 22:14:10
While trying to run Jar application using JWS (JNLP) launch. It has been giving me this error. Can't even find where is the mistake. Any directions would help. If someone could tell me where is the potential location of this error, I could find post that code here. java.lang.NumberFormatException: For input string: "\Tools_Dev\TestApp\dist" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at com.sun.deploy.security.DeployManifestChecker.verifyCodebaseEx(Unknown Source) at com.sun.deploy

AppContext is null from rmi thread with Java 7 Update 25

假装没事ソ 提交于 2019-11-30 20:47:18
We recently updated to Java 7 Update 25 from Update 21 and are now experiencing a null pointer exception when SwingUtilities.isEventDispatchThread() is called from an rmi thread becuase AppContext.getAppContext() is returning null. java.lang.NullPointerException at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source) at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source) at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source) at java.awt.Toolkit.getEventQueue(Unknown Source) at java.awt.EventQueue.isDispatchThread(Unknown Source) at javax.swing.SwingUtilities

General error during conversion: No suitable ClassLoader found for grab

好久不见. 提交于 2019-11-30 20:31:04
I've try code below... @Grapes([ @Grab('org.hsqldb:hsqldb:2.0.0'), @GrabConfig(systemClassLoader=true, initContextClassLoader=true) ]) import groovy.sql.Sql println Class.forName('org.hsqldb.jdbc.JDBCDriver').newInstance() It works in groovyConsole, but failed to run with Web Start. Following are error messages. startup failed: General error during conversion: No suitable ClassLoader found for grab java.lang.RuntimeException: No suitable ClassLoader found for grab at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance

Java 7u4 webstart security exception: Class does not match trust level

我的未来我决定 提交于 2019-11-30 20:19:51
We began to notice that with Java 7 (particularly with update 4), that all our users began to see this with our Webstart app: [14:42:58,422] AWT-EventQueue-0(DEBUG) java.lang.SecurityException: class "CLASSNAME" does not match trust level of other classes in the same package [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source) [14:42:58,422] AWT-EventQueue-0(DEBUG) at com.sun.deploy.security