Prob with executable jar
1 posts in topic
Flat View  Flat View

Posted By:   p_k
Posted On:   Friday, July 28, 2006 07:06 PM


In a swing class I am trying to call a third party class method whose entry I have in my classpath. I am able to call that method if I run my swing class from command prompt. But If I make my swing class as a executable jar then it's not recognising that third party class. I tried to set path of that third party jar using System.setProperty("java.class.path", "xxxx") but it didn't solve the problem. Please help.


Re: Prob with executable jar

Posted By:   Robert_Lybarger  
Posted On:   Friday, July 28, 2006 07:18 PM

Yep... carefully reading the description of the "java" command will enlighten you that running "-jar" option means that the classpath environment variable (and/or -classpath argument) are ignored. I believe you can specify a classpath as an entry in the manifest file... you may need to look into doing this. That is, read up on the things you can specify in the manifest file besides just the "Main-Class" that you no doubt are already specifying.
About | Sitemap | Contact