I have a question. Is it possible to use the hotswap without using breakpoints ?

When notch made prelude of chambered (http://www.youtube.com/user/Nizzotch?feature=playlist-comment#p/u) he used the hotswap without having to : - add breakpoints - save - remove breakpoint - resume In this video it's too fast to see that, but i can't find old ones.

Do you have an idea ? eclipse-options, macro, plugins ... ?

Thank you

有帮助吗?

解决方案

Depends on your JVM, but hotswap in Eclipse worked for me with no tricks on the Sun's HotSpot JVM back in the times of Java 1.5. Here's a related Sun's bug. Which JVM are you using?

public class Test {
    private static int ctr = 0;
    public static void main(String[] args) {
        while (true) {
            method();
            try {
                Thread.sleep(200);
            } catch (InterruptedException e) {
                System.err.println("Interrupted");
            }
        }
    }

    private static void method() {
        System.out.println(ctr);
    }
}

I changed System.out.println(ctr); to System.out.println(ctr++);, and my output altered to an increasing sequence.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top