By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,469 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,469 IT Pros & Developers. It's quick & easy.

Modifying java.class.path While JVM running

P: n/a
While experimenting with System.getProperty() and System.setProperty(), I've
noticed that I can change properties, but those changes do not last once
the JVM they're modified in terminates.

I experimented with java.class.path to see if I could extend it while a
class was running (I think I read about this somewhere, but I can't find it
again). I'm working on an install program and, if I could add directories
to java.class.path during the install process, it would allow me to run
classes that have been installed on the system (I can't do this ahead of
time because I won't know what path the user selects for the install).

When I have done this, I can verify that java.class.path has been altered by
my program, but it seems this added path is ignored by the JVM.

Is there any way to add paths to the classpath for a running instance of

It's not necessary, but it is an interesting question. I would think this
would not be possible because it could cause secuirty problems.

Any more info appreciated!


Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.