One-JAR with JNLP/Web-Start
843802Apr 5 2007 — edited Apr 8 2007My Problem is: I have built the swing one-jar application(which contains boot package, main/main.jar(my application) and lib/*.jar(database jar and some external jars) and images folder). Bundling all jars into a single JAR (Source: http://www-128.ibm.com/developerworks/java/library/j-onejar/) ..
It is working fine when I double click the jar(myap.jar), but if I try to run from web start (using myApp.jnlp), It is loading boot startup package and after that...it is unable to load other jars inside a single jar...ends with :: classNotFound exception(my application package jars not loading - i.e main.jar ). I red some java forums, which they are suggesting to use dynamic jar loading mechanism from boot start-up files(URLClassLoader instead of JarClassLoader)., Can any one please help me..!
I got one-jar(bundling all jars in a single jar) solution from :http://one-jar.sourceforge.net/
My JNLP file as follows
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/myapp" href="uamtool.jnlp">
<information>
<title>UAM Tool Application</title>
<vendor>Fidelity International Ltd.,</vendor>
<homepage href="index.jsp"/>
<description>UAM Tool Application</description>
<description kind="short">A demo of the capabilities of the Swing Graphical User Interface.</description>
<icon href="images/logo.gif"/>
<icon kind="splash" href="images/logo.gif"/>
<offline-allowed/>
</information>
<shortcut online="true">
<desktop/>
</shortcut>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="myap.jar" main="true"/>
</resources>
<application-desc main-class="com.simontuffs.onejar.Boot"/>
</jnlp>