Hello All, I'm trying to build an application that uses a third party class that extends JTable. I developed it in Netbeans and it runs fine. Now I'm trying to package all the class files as a jar and run them from the command line. When the app first pops up on the screen the third party app isn't used and I get to that point fine, when I push a button that causes the third party class to be instantiated I get a class not found error. I run it like this java -jar -cp c:\path_to_jar\third_party.jar myApp.jar I also tried to unpack third_pary.jar in the dir with my other class files and including its contents in myApp.jar but that didn't work either. Anybody see what I'm doing wrong here?? Thanx Dave
Michael Fitzmaurice
Ranch Hand
Joined: Aug 22, 2001
Posts: 168
posted
0
Dave If you open the jar file in something like WinZip, or use the jar utility to print it's contents, do you see your third party library in there?
"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
posted
0
I could be remembering incorrectly, but a little voice in my head is saying "executable JARs ignore external CLASSPATH settings". I also tried to unpack third_pary.jar in the dir with my other class files and including its contents in myApp.jar but that didn't work either. If done correctly, it should work. You could also just include the third party JAR with your myApp.jar. Take a look towards the end of the Creating an Executable JAR File thread for such instructions. [ October 28, 2003: Message edited by: Dirk Schreckmann ]