File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add jar files to applet's classpath

 
John Mclain
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,
i got an issue to add jar file's to applt's classpath,
i looked around accross many resources but getting no solution on this.

i have a commons-httpclient3.1.jar and i have to make it available it to a an applet class bundled in a jar file say myjar.jar

how can i achieve it?

any help would be much appreciated

thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would use the archive attribute of the applet tag.
 
John Mclain
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually, i didn't describe my problem clearly

i have to difine a classpath to point commons-httpclient.jar in manifest.mf file

please suggest me how to do this
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think the manifest is used with applets, so that wouldn't do any good. Why do you "have to" do that? Using the archive tag is the proper way to do this.
[ December 06, 2007: Message edited by: Ulf Dittmer ]
 
John Mclain
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i do need to add a classpath entry of a jar file in manifest.mf file of a jar only.

i know what should i include for this as

Class-Path:myjar.jar

but i have a little problem to understand that, where should i write this line if i have a jar file say classes.jar and if classes.jar is in a perticular directory. moreover, how can i make this entry inside a jar file?
i am using jdk1.6.0_02
i my points sit right, please erase my dumb quary

thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still don't understand why you need to do this. Earlier we were talking about an applet, and applets don't use manifest files.

You can find information about jar files and manifests here, particularly the section titled "Adding Classes to the JAR File's Classpath".
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic