B
blacky
Hello,
I would like to have my class code loaded into application, which is
already running. I tried something like this:
public class Main
{
...
private void reloadClass() throws Exception
{
new Pair("","").print(); //class to be reloaded
System.in.read (); //interval - here comes manual class recompilation
ClassLoader.getSystemClassLoader ().loadClass ("Pair"); //reload class
new Pair("","").print(); //check if new version loaded
}
}
It seems that ClassLoader.loadClass checks the presence of the Pair
class in memory and doesn't relod it. How to omit it?
regards
blacky
I would like to have my class code loaded into application, which is
already running. I tried something like this:
public class Main
{
...
private void reloadClass() throws Exception
{
new Pair("","").print(); //class to be reloaded
System.in.read (); //interval - here comes manual class recompilation
ClassLoader.getSystemClassLoader ().loadClass ("Pair"); //reload class
new Pair("","").print(); //check if new version loaded
}
}
It seems that ClassLoader.loadClass checks the presence of the Pair
class in memory and doesn't relod it. How to omit it?
regards
blacky