Bytecode Hotswap - perplex

93 Views Asked by At

I have no idea anymore. Since today 14pm the hot-code replace does not work anymore. I had jdk8_74x64 installed on win10x64.

I test it using this code in a simple project (without maven and without dependencies):

public class Test{
  public static void main(String[] args){
    System.out.println("hi"); // breakpoint here, it stops always

    System.out.println("ho"); // on suspending i change this to "hoy".
  }
}
  1. Start eclipse with new workspace - still not working
  2. Restart computer - still not working
  3. Uninstall all JDK/JRE and remove all javaws.exe, install again - still not working.
  4. Uninstall eclipse, reinstall eclipse - still not working
  5. Installed netbeans, using "apply code changes" - still not working.
  6. Delete jdk with all javaws.exe, delete eclipse, uninstall netbeans, use new user, install jdk 8u31x64 install netbeans - still not working
  7. Installed idea-community-edition15+jetbrains, change ho to hoy and apply class-changes (idea notifies me 1 class reloaded) - still not working.

How to get hot-code-replace working?

1

There are 1 best solutions below

2
Grim On BEST ANSWER

Hm,

public class Test{
  public static void main(String[] args){
    System.out.println("hi"); // breakpoint here, it stops always

    System.out.println("ho"); // on suspending i change this to "hoy".
  }
}

does not work but

public class Test{
  public static void main(String[] args){
    foobar();
  }
  public static void foobar(){
    System.out.println("hi"); // breakpoint here, it stops always

    System.out.println("ho"); // on suspending i change this to "hoy".
  }
}

Works great everywhere.