aspose file tools*
The moose likes Java in General and the fly likes implementation and interfaces in seperate jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "implementation and interfaces in seperate jar files" Watch "implementation and interfaces in seperate jar files" New topic

implementation and interfaces in seperate jar files

Abdul Basit Munda

Joined: Sep 07, 2005
Posts: 10
Hi ,
I have a question regarding packaging and loading classes from seperate jar files. I have some interface classes in one package ( jar file) and implementation classes in other jar file. Now the problem is the package ( jar ) file containing interfaces has to call implementation class which is in seperate jar . Only thing i suppose to know is the implemented class name and nothing else. I am not sure , how will i be able to do that .

Any Help will be greatly appreciated
Thanks a lot
Seb Mathe
Ranch Hand

Joined: Sep 28, 2005
Posts: 225
If you have access to the implementation at compile time : no problem.
(Your jars must only be in your classpath.)

Otherwise, one way to do this is :

Thre's a lot of examples in Java : JDBC Drivers (interface is part of Java API, implementations are DB Vendors API...), a lot of J2EE things (servlets, JMS, etc.)

Regards,<br />Seb<br /> <br />SCJP 1.4
tito bayuadji

Joined: Apr 18, 2002
Posts: 12
AFAIK as long in the same class path, I think it doesn't matter.
I agree. Here's the link:
subject: implementation and interfaces in seperate jar files
Similar Threads
figure: Structure of an ejb-jar Pg624
JDBC Application against multiple databases
What is the BEST WAY to provide java code to vendor?
Launching From Command Line
jar input txt file