This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes What is hot code replacement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is hot code replacement?" Watch "What is hot code replacement?" New topic
Author

What is hot code replacement?

Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
I heard that JDK 1.4 supports hot code replacement feature. What is it? Can someone give a simple explanation/example?
Thanks


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Steve Chernyak
Ranch Hand

Joined: Oct 19, 2000
Posts: 113
I think its for debugging purposes.
If while you are debugging an application you want to change code in the current method the debugger is able to reexecute that method with out having to restart the application.
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
Thanks Steve.
This is interesting.
I use Eclipse IDE I will try this. You mean this is not an IDE feature but built in JDK?
Steve Chernyak
Ranch Hand

Joined: Oct 19, 2000
Posts: 113
Yeah its cool.
Eclipse is what I tried it with too.
For somereason you can't do it in the main method.
Im not sure if its because its static or not
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Sun is calling it HotSwap. It allows a class to be updated while under the control of a debugger. More informaion on HowSwap can be found in The JPDA Enhancements Document.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is hot code replacement?