'Eclipse obsolete methods on the stack

I'm using Eclipse for Java on my Macbook air, OS 10.9. I keep getting the error Obsolete Methods on the Stack, with a warning about how it may cause problems with the virtual machine when I run very basic programs that have no errors. I ran a program that just had the class and the main method and I got this error. After the error box, the bug referred to the main method, but I know the syntax is correct because I used Eclipse's main method.

import java.util.Scanner;

public class Dowhile {

    public static void main(String[] args) {
        /*Scanner scanner = new Scanner(System.in);
        System.out.println("Enter a number");
        int value = scanner.nextInt();
        System.out.println(value);*/
        /*do{
            System.out.println("Enter a number ");
            int value = scanner.nextInt();

        }
        while(value != 5);
        System.out.println("Got 5");*/
    }
}

Update:

I'm not getting the obsolete methods error now, just Exception in thread "main"... at line 5.



Solution 1:[1]

This error message indicates that you are doing hot code replace, and that the frames on the stack no longer match the class files in the running VM. Restarting your debug session/target VM should suffice.

Hot code replace (HCR) meaning:

It is a debugging technique whereby the Eclipse Java debugger transmits new class files over the debugging channel to another JVM.

read more.

Bugzilla

Dreamincode

Solution 2:[2]

I clicked on Terminate button and it no longer showed that warning message again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Anmol Khatri