wood burning stoves 2.0*
The moose likes Java in General and the fly likes Updating Sun's Java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Updating Sun Watch "Updating Sun New topic
Author

Updating Sun's Java code

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
I don't know how ill-advised it is but if I want to temporarily update an origina Java class such as Container: shouldn't I be able to make the change to the version in src.jar and then implant the class version into rt.jar? I did this, and my change is being ignored.
Any help please?
Paul
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Perhaps your classpath is picking up a different version of the Container class in a different directory?


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Or are you using a browser, and it may be looking a different directory than you think.
Iain Lowe
Greenhorn

Joined: Sep 07, 2001
Posts: 12
Create and compile the class you want to replace. Then add it to the boot classpath using java -Xbootclasspath/p:<path to new class>. This command will prepend your class to the boot classpath and will override Sun's implementation without requiring you to muck around with rt.jar which could eventually screw up other working Java stuff you have.
[This message has been edited by Iain Lowe (edited October 03, 2001).]
[This message has been edited by Iain Lowe (edited October 03, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updating Sun's Java code