Dynamic loading of jar files...

R

Reinhard Rossmy

Could I change my classpath at runtime? I'd like to load a jar file
dynamically, without any instance of class!
Knows anywhere the generic mechanismen of Java IDE Eclipse? I don't
find the right place, shit.
Thanks....
 
R

Reinhard Rossmy

No, you can't. Well, you can change the properties, but they will not
become effective.


What do you mean with "load a jar file"? If you mean

- Just reading some data (files, etc) from a jar:

java.util.jar

- Creating objects from classes in that jar:

java.net.URLClassLoader can load classes from jar's, too.

/Thomas

Thank you for all answers...

Point number one is clear.
Point number two ...
I'd like to tell my application at runtime a new jar file (maybe the
same as setting all the *.jar's in classpath before running). I don't
like to instance a class.
I see the mechanism in the java ide eclipse.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top