Thread View: borland.public.jbuilder.java.language
3 messages
3 total messages
Started by Mark Hage
Wed, 08 Feb 2006 10:38
load jar library
Author: Mark Hage
Date: Wed, 08 Feb 2006 10:38
Date: Wed, 08 Feb 2006 10:38
7 lines
1195 bytes
1195 bytes
I'm creating an application and want to use the jar file of another application. I want the user to point out where the other application is located and then load that jar file at runtime. How do I do this?? Mark
Re: load jar library
Author: Kevin Dean [TeamB]
Date: Wed, 08 Feb 2006 16:22
Date: Wed, 08 Feb 2006 16:22
22 lines
1723 bytes
1723 bytes
Mark Hage wrote: >I'm creating an application and want to use the jar file of another >application. >I want the user to point out where the other application is located and >then load that jar file at runtime. >How do I do this?? Look at the class java.net.URLClassLoader. -- Kevin Dean [TeamB] Dolphin Data Development Ltd. http://www.datadevelopment.com/ NEW WHITEPAPERS Team Development with JBuilder and Borland Enterprise Server Securing Borland Enterprise Server http://www.datadevelopment.com/papers/index.html Please see Borland's newsgroup guidelines at http://info.borland.com/newsgroups/guide.html
Re: load jar library
Author: Paul Furbacher [TeamB]
Date: Wed, 08 Feb 2006 17:52
Date: Wed, 08 Feb 2006 17:52
41 lines
2500 bytes
2500 bytes
Kevin Dean [TeamB] wrote:
> Mark Hage wrote:
>
>> I'm creating an application and want to use the jar file of another
>> application.
>> I want the user to point out where the other application is located
>> and then load that jar file at runtime.
>> How do I do this??
>
>
> Look at the class java.net.URLClassLoader.
For a working example, you could download Cayenne M10
release and look at the source code for their Modeler.
The Cayenne Modeler allows you to add JDBC drivers
(i.e. JARs) on the fly.
In particular, look at FileClassLoadingService in
the package, org.objectstyle.cayenne.modeler. It
essentially uses URLClassLoader. They subclass it
to encapsulate just a little bit more functionality.
Almost forgot the URL for Cayenne:
http://objectstyle.org/cayenne
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads