简体   繁体   中英

Including a jar file in another jar file in netbeans

I have created an applet and made its jar file in Netbeans. i am using a jar file in an applet. I am calling the applet.jar in a jsp page. The applet works fine but the functionality it has to be achieved is through the another jar file which i was using in that applet. means how to include an external jar file in applet.jar so that it could also be available to that jsp page also when i will run the jsp page.

If you just need to make a jar file available to your applet code, you can just host it from your server and reference it in the <applet> tag. That might be easier than combining the jars, and easier to maintain.

There's a nice overview here , from which I take this example:

<applet code="main.class" codebase="/java" width="100" height="100" archive="applet.zip"> </applet>

...makes the classes in /java/applet.zip available to your application.


Update - the information about the APPLET tag in the Sun/Oracle documentation is comprehensive and easy to follow, ie http://docs.oracle.com/javase/1.4.2/docs/guide/misc/applet.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM