0

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?

Grim
  • 1,938
  • 10
  • 56
  • 123

1 Answers1

0

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.

Grim
  • 1,938
  • 10
  • 56
  • 123
  • So what you really want is byte code hot swapping at runtime. If you are on IRC, I suggest that you ask Maldivia on ##freenode's Java. He is a JVM guru and a driving force behind JRebel (mostly due to his technical skills in the matter) – fge Feb 25 '16 at 16:50
  • @fge I changed the tag from hot-code-replace to bytecode-hot-swap. – Grim Feb 25 '16 at 16:58