• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

packages in applets

 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,
I have a question about external java libraries. I have applets that use other java libraries (PDFBox, SQL server drivers, etc.), and what I do is put the Binary code in the jar file with the applet that the HTML page calls. This makes the applet take forever to load because the jar file becomes huge. I know that this is wrong but how else can you do it? For some reason setting classpaths doesn't work for me.

Thanks,
Andrew
 
Paul Clapham
Sheriff
Pie
Posts: 20746
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use the "archive" attribute of the <applet> tag. Here's a link to a tutorial: http://download.oracle.com/javase/tutorial/deployment/applet/html.html.
 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul,
I actually am already using archive to access the .jar file that contains my applet class and its supporting files. I'm just wondering if I can use archive in the applet tag to access my applet, and have that access a different jar file outside of the jar that contains my applet.
So let's say I have MyApplet.jar and MySupportFiles.jar. If they are in the same directory, and my HTML page accesses the MyApplet.jar with the archive attribute, could it then use classes that are in MySupportFiles.jar?

Thanks again,
Andrew
 
Paul Clapham
Sheriff
Pie
Posts: 20746
30
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The archive attribute should list all the jars required. Including the applet itself, of course.
 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh so you can use the archive attribute to access more than one .jar file?
I did not know that.
Would it just look like
?

Thanks,
Andrew
 
Paul Clapham
Sheriff
Pie
Posts: 20746
30
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, of course not. It's an attribute.

Here's some documentation for you to read: http://htmlhelp.com/reference/html40/special/applet.html.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Applets forum.
 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, Thank you guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic