Question about setting classpath

Discussion in 'Mac Programming' started by jtalerico, Feb 26, 2006.

  1. macrumors 6502

    Joined:
    Nov 23, 2005
    #1
    So I have written a java program that uses Commons-Net. Everytime i run my program from the .jar file it errors out telling me it cannot use the Commons-Net, but i have the the commons-net .jar included in the .jar file that i created. But everytime i try to run it, i get errors, what should i do for my classpath? Or what else could it be?
     
  2. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
    I assume you are trying my previous suggestion about the Class-path attribute of the Manifest file? Didn't realize you were looking to bundle it all together...So you basicaly have two options.

    1) unjar the classes in the commons-net into your project and jar everything up together without a jar within the jar.

    2) look into a utility such as One-JAR, which has its own classloader to help...

    Good Luck.
     
  3. thread starter macrumors 6502

    Joined:
    Nov 23, 2005
    #3
    Thanks king, ill give it a go!
     

Share This Page