Adding external libraries through Terminal

Discussion in 'Mac Programming' started by Hussain Ali, Feb 24, 2010.

  1. macrumors newbie

    Joined:
    Feb 24, 2010
    #1
    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
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Add the JARs to your CLASSPATH either through your Ant / Maven build script or manually.
     
  3. macrumors 603

    Joined:
    Aug 9, 2009
    #3
    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
     

Share This Page