File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes jar to jar communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jar to jar communication" Watch "jar to jar communication" New topic
Author

jar to jar communication

Deepa Raghuraman
Greenhorn

Joined: Nov 26, 2001
Posts: 13
hello friends,
i have a problem.
i have created two jar files and i want to use class of one jar file in another jar file
consider J1.jar and J2.jar are the two jar files
J1.jar file contains C1.class and C2.class
J2.jar file contains C3.class and C4.class
Now i want C3 object instantiated in C1
when i tried it gave me an exception :
"NoSuchClassDefError"
reply soon
Deepa Raghuraman
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
As long as both jar files are in your classpath, the classes should be found.
Double-check your classpath settings. Make sure both jars are included - you have to actually include the name of each jar file. It's not sufficient to include the directory where the jar files are located.


Rob
SCJP 1.4
Gerry Giese
Ranch Hand

Joined: Aug 02, 2001
Posts: 247
Meesa no understand why you have problem wit jar jar!
Are you using the full package name? The objects reside in different namespace, so you have to use the full name or it won't work.


CJP (Certifiable Java Programmer), AMSE (Anti-Microsoft Software Engineer)
Author of Posts in the Saloon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jar to jar communication