As the title underlines it, I am having trouble with the Java compiler for Ubuntu. I did a fresh install of the OS. Before uninstalling Ubuntu, a few months ago, Eclipse's Java compiler worked like a charm. I followed the exact same steps...:
- Install OpenJDK Java 7 Runtime (lastest official JDK on Ubuntu that worked for me before);
- Install the lastest version of Eclipse;
- Run it from my main folder, My documents, Desktop, separate HDD and separate partition... all failed;
I think it has something to do with the compiler... I use Java 1.8 (the same as my Windows 8.1 compiler that works very well too). I remember exactly also that it was the same as the one I had a few months ago.
I am getting compiler errors in a main method (System.out.println(), String, double, etc.) and I would like to resolve this a fast as possible.
Here is an exhaustive list of the errors I am getting:
import java.util.*;
public class StackOverFlow {(...code...)} [Implicit super constructor Object() is undefined for defaults constructor. Must define a apecific constructor] S
String(...); [String cannot be resolved to a type]
Scanner (...); [Scanner cannot be revolved to a type]
System.out.println(...); [System cannot be resolved]
System.in ; [System cannot be resolved to a variable]
Do I need to enable/disable some settings? Do I need to install or copy/create additional files? Anything else?
All help is highly appreciated.
Thank you!
java -version
andjavac -version
on the command line what is the output? Have you configured the SDKs in Eclipse and your project? – mkobit