my dog learned polymorphism
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

jar to jar communication

Deepa Raghuraman

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 :
reply soon
Deepa Raghuraman
Rob Ross

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.

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:
subject: jar to jar communication
It's not a secret anymore!