This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Prepend to java class path dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Prepend to java class path dynamically" Watch "Prepend to java class path dynamically" New topic
Author

Prepend to java class path dynamically

Jiju Jacob
Greenhorn

Joined: Jul 12, 2005
Posts: 5
Hi,

I am stuck with a strange problem.

I have a jar called abc.jar which runs my GUI application. Let us say that abc.jar has a class called Test.class.

My customer has a requirement that he would supply another jar called patch.jar whose path he would specify in the GUI application while it is already running. The patch.jar contains a replacement for Test.class. When the user specifies the path to the patch.jar and clicks on OK, i need to load the new Test.class from patch.jar instead of abc.jar

It is also safe to assume that Test.class has not been loaded till the point the patch.jar path has been specified by the customer and he has clicked ok.

How can this problem be solved?

Thanks,
Jiju
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
You need to look into Java Classloaders.

Good luck, its complicated.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prepend to java class path dynamically
 
Similar Threads
Including a jar within a jar
Java commandline -cp parameter
Reading a EAR file
Problem in executing java project jar file
WEB-INF/lib search order