-3

Language: Java
JRE: jre1.8.0_144
IDE: Eclipse Oxygen Release (4.7.0)

Description: After I hit the "run" botton, the code did not compile and red text appear in the console.

Screenshot: Screenshot of the error.

Here is the code:

package chapter3.project2;
import java.util.*;

public class MetricConversion {

    public static void main(String[] args) {
        System.out.println("WTF Eclipse?");
    }
}

error message:

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
at chapter3.project2.MetricConversion.main(MetricConversion.java:30)

It seems that no matter what I put in the main method, the error just kept popping up.

Thank you.

Pshemo
  • 122,468
  • 25
  • 185
  • 269

1 Answers1

0

Where is jre library? Why not compile and run from source folder? Check project property and add jre runtime library also create source folder (src) and compile and run. Or Build a clean Java project and add packages and classes in src folder.

Anil K
  • 110
  • 9