PDA

View Full Version : Adding external libraries through Terminal




Hussain Ali
Feb 24, 2010, 03:59 AM
hello
I m newly using Mac os x
I want to set libraries through terminal
I am creating a program in java to extract data from an image
for that purpose i ve installed Asprise OCR library's package
it having two main files
1-aspriseOCR.jar file
2-libAspriseOCR.jnilib file

and i want to run my Demo program through terminal

how can i run my program



when i run program it gives an error
com.util..... package not found



Cromulent
Feb 24, 2010, 05:56 AM
Add the JARs to your CLASSPATH either through your Ant / Maven build script or manually.

chown33
Feb 24, 2010, 12:04 PM
Add the JARs to your CLASSPATH either through your Ant / Maven build script or manually.

Or add a Class-Path element to the manifest of the jar containing the app, which refers to the library jars by relative path.
http://en.wikipedia.org/wiki/Manifest_file

For the detailed spec, google keywords: java manifest specification