PaulBunion
PaulBunion

Reputation: 394

Eclipse can't see Java

So I'm throughly confused. Eclipse both does and doesn't see Java. I'm running Eclipse Photon (4.8.0), Java 10.0.2, and macOS High Sierra 10.13.6. In the Eclipse preferences, under the Oomph menu, it does show the accurate location of the JDK, but there is no Java menu in the preferences, and it does not recognize any of my project files and does not compile.

Edit: Screenshots showing a project properties pane and the settings panel when searching for Java and a link to the Eclipse About config:

Eclipse About Config

Project Properties pane

Search result in Preferences

Upvotes: 0

Views: 2507

Answers (2)

Tony Weddle
Tony Weddle

Reputation: 2091

OK, with the config information, it looks like you downloaded Eclipse IDE for Testers (note the eclipse.product property). I don't know the exact purpose of that package but though it does have at least parts of the JDT features, it is clearly missing a lot of stuff for Java development.

The Java VM seen by Oomph is simply what it's been able to discern is available on your system and highlights which is being used to run eclipse (it isn't showing eclipse defined JREs).

So, you'll need to download Eclipse IDE for Java Developers or one of several other packages that include Java development tools (like Eclipse IDE for Java EE Developers, among others). https://www.eclipse.org/downloads/packages/

Upvotes: 1

Tony Weddle
Tony Weddle

Reputation: 2091

Without a screenshot, I can't be sure but it looks like your project is just a plain project. Right click on it then go to Configure>Convert to Faceted Form at which point the project facets page will show up and you can click the Java facet, then click "Apply and Close".

The project should now be a Java project and you can set build path and so on. If not, then more info about the project would help, perhaps a screenshot of Project Properties page (right click on the project and select Properties).

Upvotes: 0

Related Questions