• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

implementation and interfaces in seperate jar files

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFAIK as long in the same class path, I think it doesn't matter.
 
Hot dog! An advertiser loves us THIS much:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic