This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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.
Have you checked out Aspose?
subject: implementation and interfaces in seperate jar files
jQuery in Action, 3rd edition