• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a JApplet Class in subfolder of a JAR

 
Vincent Oh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both my HTML and JAR file are in the same folder.



My JAR file hierarchy:
Tester3/HelloApplet1.class
HelloApplet.class
META-INF/Manifest.mf

I can call HelloApplet.class with no problem but for the one inside Tester3 folder, I cant seems to be able to reach it. Any help? Thanks in advance.
 
Tim Moores
Bartender
Posts: 2756
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way to make it work is if the HelloApplet1 clas is in package called "Tester3". Otherwise there's no way.
 
Vincent Oh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:The only way to make it work is if the HelloApplet1 clas is in package called "Tester3". Otherwise there's no way.


It is already define with package Tester3. I export the class file from Eclipse. Just that I do not know how to script the HTML for it to target the subfolder in a Jar file.
 
Tim Moores
Bartender
Posts: 2756
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
like this:

... code="Tester3.HelloApplet1.class" ...

See http://docs.oracle.com/javase/1.4.2/docs/guide/misc/applet.html and http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/contents.html for everything you need to know about deploying applets.
 
Vincent Oh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya i figured it out awhile after my previous reply. need to use "dot" to indicate package hierarchy. thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic