Eclipse does not update class changes

Asked

Viewed 317 times

0

I’m a beginner in Java and using the Eclipse IDE, it was working normally when the changes I made to the classes stopped appearing on the console. For example: if previously the program was written like this:

public class Programa {
    public static void main(String[] args) {
        System.out.println("olá mundo");
    }
}

The console would print hello world normally, but when I made a change in class and left as below:

public class Programa {
    public static void main(String[] args) {
        System.out.println("olá mundo");
        System.out.println("nao está funcionando");
    }
}

When running the code, the console keeps showing only hello world, even if I click save. It’s like I haven’t made any class changes.

Also, when I create a new class, when running the program, even if the code has no syntactic problem, the eclipse does not run anything, it just says that I could not find or load the main class with the message: could not find or load main class on the console

  • Check the environment variables of your eclipse, check which java is being used by your project. your code is ok: https://repl.it/@andremartds/Biodegradablebuoyantorders

1 answer

0

Take a look at your run Configurations:

Run Menu -> Run Configurations -> Java Applocation -> suaclass

Make sure the Main Class is set correctly

Browser other questions tagged

You are not signed in. Login or sign up in order to post.