• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using a jar inside my application  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have the following structure :
dir\com // dir for classes
dir\images // dir for images
dir\lib // dir for jars I used them in my application (like JavaHelp).
now, I want to use a library (which its inside lib dir in a jar format) inside my application classes (which are inside the com dir).
how can I use these libraries ? can I load them ? if yes, please tell how ?
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to make sure that your libraries are within your project class path.
[ May 25, 2004: Message edited by: Dale DeMott ]
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lets assume that I want to use an extra library (jar file inside the lib dir) in my application.
this jar contains the following package : javax.help.*
can I write inside my application (which is inside the com dir) :
import javax.help.*;
if I have included the lib dir in the jar's manifest file ??
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure, but I remember something like:
include a dir: access to all .class -files therein.
include a jar: include every jar separatedly.

If you already have this structure, you may easily test your assumptions.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!