Adding external libraries through Terminal

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

  1. Hussain Ali
    Expand Collapse
    macrumors newbie

    Feb 24, 2010
    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. Cromulent
    Expand Collapse
    macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Add the JARs to your CLASSPATH either through your Ant / Maven build script or manually.
  3. chown33
    Expand Collapse
    macrumors 604

    Aug 9, 2009
    Or add a Class-Path element to the manifest of the jar containing the app, which refers to the library jars by relative path.

    For the detailed spec, google keywords: java manifest specification

Share This Page