开发者

applet with external dependecies - java.lang.NoClassDefFoundError

开发者 https://www.devze.com 2023-03-25 16:49 出处:网络
I have an applet that depends on a number of jar files. The jars have been added to the classpath in eclipse. When I run the applet in eclipse, everything works OK. I then tried to put the applet on m

I have an applet that depends on a number of jar files. The jars have been added to the classpath in eclipse. When I run the applet in eclipse, everything works OK. I then tried to put the applet on my website, and ran into the java.lang.NoClassDefFoundError related to classes in the external jar files.

I did:

jar -cvfm test.jar MANIFEST.MF *.class

with MANIFEST.M开发者_如何学JAVAF:

Class-Path: blah.jar blah2.jar

I then just put the two external jars in the same folder as the applet on my website and referenced the applet jar in the html. The relevant part of the jnlp file looks like:

<jar href="test.jar" main="true" />
<jar href="blah.jar" />
<jar href="blah2.jar" />
0

精彩评论

暂无评论...
验证码 换一张
取 消