Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Applet accessing a jar?

Started by sagwagon Jan 20, 2004 at 4:52 AM 2 replies 600+ views
Original Post
sagwagon
sagwagon
My applet class is outside of the jar. The jar is in the same directory as the applet. How do I make them find one another?
sagwagon
sagwagon
Because I''m testing and I don''t want to bother with putting it in the jar every time I compile...... ie I''m lazy.
K_I_L_E_R
K_I_L_E_R
Applets do not have the security privilege to access outside libraries or files if they are loaded over the net.

However, if they are laoded onto your filesystem it is doable.

EDIT:

Okay I got it:

Make an app with an applet as a container.
IE: frame.getContentPane().add(applet)

Make the application able to internally un-jar files so it can view them.

When your application recognises the files "class/source" the application then should either:

Make a temp file of those source/class files.
Or read off them directly.

Hope this helps.

EDIT++:

Errr, you can import the classes in the class source file by including the jar as a package and then go through the package to import the classes.
Hehehe..., I just done that. :lol:

I have a bad habbit of complicating things.

[edited by - K_I_L_E_R on January 20, 2004 11:39:18 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.