View Full Version : Question about setting classpath
jtalerico
Feb 26, 2006, 05:49 PM
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
Feb 26, 2006, 09:07 PM
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 (http://one-jar.sourceforge.net/), which has its own classloader to help...
Good Luck.
jtalerico
Feb 27, 2006, 06:18 AM
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 (http://one-jar.sourceforge.net/), which has its own classloader to help...
Good Luck.
Thanks king, ill give it a go!
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.