Is it possible to declare the classpath of an applet in a JAR rather than an applet tag?
I am creating an applet with a fairly large classpath. ( externalLib1.jar, externalLib2.jar
etc.)
MyApplet.jar
, the applicator contains a manifest. MF, including the ClassPath attribute containing all the required jars.
ClassPath = externalLib1.jar externalLib2.jar externalLib3.jar externalLib4.jar etc.jar
Is there a way to load the applet without listing all the jars in the tag <applet>
?
I would like to:
<applet code="MyApplet.class" codebase="mycodeBase" archive="MyApplet.jar"/>
and not:
<applet code="MyApplet.class" codebase="mycodeBase" archive="MyApplet.jar,externalLib1.jar,externalLib2.jar,externalLib3.jar,externalLib4.jar,etc.jar"/>
Is there a way to achieve this?
Am I missing something somewhere?
Thanks for your help!
a source to share
You can unzip all external binaries from external libraries. Then write all the classes together with your usual ones in one jar. This will only allow you to have one jar declaration, but you will need to change the code and code attributes to ensure proper navigation through the jar structure.
It's not perfect, but it will work. You will also vouch for external libraries if you sign your bank.
What are your concerns about having a large class? Is this causing problems for you somewhere?
a source to share