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 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
Author

implementation and interfaces in seperate jar files

Abdul Basit Munda
Greenhorn

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
Greenhorn

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: http://aspose.com/file-tools
 
subject: implementation and interfaces in seperate jar files