This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes NullPointerException while launching an application from JNLP with Java 64x 1.7.0_06+ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "NullPointerException while launching an application from JNLP with Java 64x 1.7.0_06+" Watch "NullPointerException while launching an application from JNLP with Java 64x 1.7.0_06+" New topic
Author

NullPointerException while launching an application from JNLP with Java 64x 1.7.0_06+

Victor Lecavalier
Greenhorn

Joined: Sep 13, 2012
Posts: 2
The following app works perfectly with Java 1.7.0_05 and older:

<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 with Java1.7.0_06 or 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)


The console logs are :


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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NullPointerException while launching an application from JNLP with Java 64x 1.7.0_06+
 
Similar Threads
My jnlp didn't work with multipl jars in the ressource section
Run JAR file in Applet
JAR inclues native code
unable to resources in JNLP
Image file in cannopt access-getting error