Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jtalerico

macrumors 6502
Original poster
Nov 23, 2005
358
0
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?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
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.
 

jtalerico

macrumors 6502
Original poster
Nov 23, 2005
358
0
kingjr3 said:
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.

Thanks king, ill give it a go!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.