Re: JAR file which needs to call another jar file....



Thomas Hawtin wrote:
James Westby wrote:


A jar cannot access a jar within itself. I'm not sure how it works in applets, but in applications the second jar (physics.jar) needs to be outside the first (PinballGame.jar), but on it's classpath.


You can open the jar inside as a resource, but you wouldn't be able to load classes from it (as an applet).

Thanks for pointing this out. Could you clarify the comment "as an applet" for me please? Do you Mean that an applet could not be created from them, or that they cannot be loaded when you are operating as an applet? If it is the latter then how is it possible as an application? Does it require a different classloader to be used?


I ask because I have come across this situation before (with an application) and I couldn't see a solution to the problem that I liked anywhere, it would be good to know whether this is possible.

Thanks,

James
.



Relevant Pages

  • Re: Why no getCodebase() in apps?
    ... The Applet purpose is to be able to check ... The getCodebase() method is also commonly used to establish a path to ... folder), it is easy to create code that will still work even if you ... It would be very handy to have a similar method for applications. ...
    (comp.lang.java.help)
  • Re: Image manipulation in applications
    ... >> than an applet, I just can't figure out how to do the ... Swing is related to user ... > and applications, ... I have written many applications, including ones with Swing interfaces, ...
    (comp.lang.java.help)
  • Re: get a slider onto a web page?
    ... > Convert it to an applet instead of an application. ... applications are easier to develop, ... "The storm broke with a violent flash of lightning, and an apalling crash ... Severed Heads 'Dead Eyes Opened' ...
    (comp.lang.java.programmer)
  • Re: Ein paar Fragen zu Applets
    ... Sollte man lieber "Applet" statt "JApplet" verwenden? ... Laufen sie auch z.B. im IE auf der MS Java VM? ... Enterprise Applications. ...
    (de.comp.lang.java)
  • ZipFile() with URL
    ... I am looking to enumerate all of the file names in a zip file. ... If I have a zip file, abc.zip, and it is local, at the root of my classpath, ... However, when I move the applet to a website,, ...
    (comp.lang.java.programmer)