Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Compiling using Java 8(Getting error)
Compiling using Java 8 [message #1791115] Sat, 23 June 2018 16:40 Go to next message
Mitch Martin is currently offline Mitch MartinFriend
Messages: 1
Registered: June 2018
Junior Member
I get this:
Use -source 8 or higher to enable static interface method invocations

When I try to compile, Ive been told to compile on Java 8 but cant seem to figure out how. Im not sure If I have java downloaded incorrectly or if I have eclipse setup incorrectly but I really need to get this project done for an online course and my instructor just keeps sending me links to change things and when I say they dont work he just replies sorry dont know what to tell you :( Can someone please explain what Im doing wrong here and how to fix it.
Re: Compiling using Java 8 [message #1791191 is a reply to message #1791115] Mon, 25 June 2018 18:39 Go to previous messageGo to next message
Matthew Janssen is currently offline Matthew JanssenFriend
Messages: 5
Registered: June 2018
Junior Member
In Eclipse, go to Window > Preferences > Java > Installed JREs. Then either add or edit the list to point to your Java 8 JDK installation.
Re: Compiling using Java 8 [message #1791194 is a reply to message #1791191] Mon, 25 June 2018 19:15 Go to previous message
Nitin Dahyabhai is currently online Nitin DahyabhaiFriend
Messages: 3755
Registered: July 2009
Senior Member

After having a 1.8 Java Runtime to compile against, you also need to set
the Java Compiler preferences (or properties on the project
specifically) to comply with 1.8's language features, among other
settings you might wish to change.

Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Mon, 25 June 2018 19:15]

Report message to a moderator

Previous Topic:Too Difficult to install, to compile, to use ide, and to uninstall
Next Topic:Post Approval Wait Time
Goto Forum:

Current Time: Thu Jul 09 21:48:59 GMT 2020

Powered by FUDForum. Page generated in 0.05259 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top