NullPointerException when starting an application from JNLP with Java 64 bit 1.7.0_06 +

The following application works fine with Java 1.7.0_05 and later:

<jnlp spec="1.0+" codebase="http://localhost/demo/"> <information> <title>BPI 4.7</title> <vendor>Fox Technical Services Inc.</vendor> <homepage href="/home.html"/> <description>Fox Client</description> <description kind="short">Fox</description> <icon href="base/Fox64.gif" height="64" width="64"/> </information> <security> <all-permissions/> </security> <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/> <jar href="base/application.jar" main="true"/> <jar href="base/sessions.jar"/> <jar href="base/swingSessions.jar"/> <jar href="base/sharedClientServer.jar"/> <jar href="base/baseLookAndFeelNoDecorations.jar"/> <jar href="base/clientCommon2.jar"/> <jar href="base/httpProvider.jar"/> <jar href="base/swing.jar"/> <jar href="base/swingImages.jar"/> <jar href="base/glf.jar"/> <jar href="base/vnc.jar"/> <jar href="thirdPartyLib/TableLayout-bin-jdk1.5-2007-04-21.jar"/> <jar href="thirdPartyLib/dbswing.jar"/> <jar href="thirdPartyLib/dx.jar"/> <jar href="thirdPartyLib/beandt.jar"/> <jar href="thirdPartyLib/jnlp.jar"/> <jar href="thirdPartyLib/alloy.jar"/> <jar href="thirdPartyLib/commons-beanutils.jar"/> <jar href="thirdPartyLib/commons-collections-3.1.jar"/> <jar href="thirdPartyLib/commons-logging.jar"/> <jar href="thirdPartyLib/commons-codec-1.3.jar"/> <jar href="thirdPartyLib/commons-lang-2.0.jar" download="lazy"/> <jar href="thirdPartyLib/httpclient-4.0-beta2.jar"/> <jar href="thirdPartyLib/httpcore-4.0.jar"/> <jar href="thirdPartyLib/log4j-1.2.15.jar" download="lazy"/> <jar href="thirdPartyLib/jbcl.jar" download="lazy"/> <jar href="thirdPartyLib/mail-1.4.jar" download="lazy"/> <jar href="thirdPartyLib/activation-1.1.jar" download="lazy"/> <jar href="base/javolution.jar" download="lazy"/> </resources> <application-desc> </application-desc> </jnlp> 

When I try to run it using Java1.7.0_06 and newer, I get an exception:

 java.lang.NullPointerException at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at com.sun.javaws.LaunchDownload.getMainClassName(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 

Console Logs:

 Java Web Start 10.7.2.11 Using JRE version 1.7.0_07-b11 Java HotSpot(TM) 64-Bit Server VM User home directory = C:\Users\val ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message m: print memory usage o: trigger logging p: reload proxy configuration q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack 0-5: set trace level to <n> ---------------------------------------------------- Match: beginTraversal Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null], JREInfo: JREInfo for index 0: platform is: 1.7 product is: 1.7.0_07 location is: http://java.sun.com/products/autodl/j2se path is: C:\Program Files\Java\jre7\bin\javaw.exe args is: null native platform is: Windows, amd64 [ x86_64, 64bit ] JavaFX runtime is: JavaFX 2.2.1 found at C:\Program Files\Java\jre7\ enabled is: true registered is: true system is: true Match: ignoring maxHeap: -1 Match: ignoring InitHeap: -1 Match: digesting vmargs: null Match: digested vmargs: [JVMParameters: isSecure: true, args: ] Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ] Match: digest LaunchDesc: null Match: digest properties: [] Match: JVM args: [JVMParameters: isSecure: true, args: ] Match: endTraversal .. Match: JVM args final: Match: Running JREInfo Version match: 1.7.0.07 == 1.7.0.07 Match: Running JVM args match: have:<> satisfy want:<> #### Java Web Start Error: #### null 

Any help would be greatly appreciated!

+4
source share
1 answer

It is strange that your app-desc element is empty.

According to jnlp-secification, it should contain the attribute attribute of the main-class .

 <application-desc main-class="com.yourcompany.MyCoolApplication" /> 
0
source

Source: https://habr.com/ru/post/1433851/


All Articles