This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Modify a method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Modify a method " Watch "Modify a method " New topic

Modify a method

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Je suis � la recherche d'un petit renseignement :
Est-il possible en JAVA de modifier lors de l'execution d'une application une m�thode sur une classe ?
(et si oui, comment)
Merci d'avance.
(Can I modify a method of a class when the apllication is running ? Thanks...)

Frank Carver

Joined: Jan 07, 1999
Posts: 6920
It is definately possible to reload a new version of a class while an application is running. I regularly use servlet engines (JServ, Resin) and a test harness (JUnit) which do this. I believe they each provide a slightly modified ClassLoader to do this though. Source code for all the above systems is available, let me know if you need the URLs.
I don't think you can reload individual methods.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Fred Abbot
Ranch Hand

Joined: Jun 01, 2000
Posts: 300
thanx for removing my post very nice of you
am i wrong or do you understand what i wrote and therfore took it off
I agree. Here's the link:
subject: Modify a method
It's not a secret anymore!