Hello.
I am developing a class manipulater in which I add and delete some fields and methods.
I have a main class which is connected to GUI.

Whenever I change a class, I have to restart the GUI in order to get the changes applied.

I would like to gently ask whether there is a way to recompile the class without restarting my GUI( in main class).

I am using eclipse.
I have a compiler method.
I copy the new class file into project/bin directory.
but, still the changes does not apply.

Plesae help.
Thanks in advance.

whether there is a way to recompile the class without restarting my GUI(

Yes you should be able to recompile the class without restarting your JVM.
However, I don' think you will be able to load and use the new version of the class in the current JVM. Once a classloader has loaded a class, I don't know of a way to tell it to replace the current loaded version with another version of that class.

Yes you should be able to recompile the class without restarting your JVM.
However, I don' think you will be able to load and use the new version of the class in the current JVM. Once a classloader has loaded a class, I don't know of a way to tell it to replace the current loaded version with another version of that class.

Thanks for the response dear friend. actually, when I close the GUI and refresh the class which has just been modified and restart the GUI, then it works fine.

The only problem is about refreshing.
Do you have any idea?
Cheers.
Fatih

This article has been dead for over six months. Start a new discussion instead.