Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How can I get the execution environment JavaSE-1.8 in Eclipse?
How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976646] Thu, 08 November 2012 18:50 Go to next message
Mohsen Vakilian is currently offline Mohsen Vakilian
Messages: 11
Registered: June 2011
Junior Member
I'd like to bring the question at http://stackoverflow.com/q/13295275/130224 to the attention of this forum. If you know the answer, please reply either on this forum or stackoverflow.com.
Re: How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976666 is a reply to message #976646] Thu, 08 November 2012 19:05 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
There's not Java8 execution env (EE) yet specified by OSGi as far as I
know!

Beside that there are more EE to speced for Java8 because we'll have the
Compact1, Compact2, Compat3 (=Java8 SE) EEs because of the missing jigsaw.

Ideally your EE and compiler settings are equal but that's not a must so
you can set your compiler Java8 and use the syntax.

Tom

Am 08.11.12 19:50, schrieb Mohsen Vakilian:
> I'd like to bring the question at
> http://stackoverflow.com/q/13295275/130224 to the attention of this
> forum. If you know the answer, please reply either on this forum or
> stackoverflow.com.
Re: How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976679 is a reply to message #976666] Thu, 08 November 2012 19:24 Go to previous messageGo to next message
Mohsen Vakilian is currently offline Mohsen Vakilian
Messages: 11
Registered: June 2011
Junior Member
Tom,

1. How can I set the source code level to 1.8 without having an EE?
2. Please note that the instructions at http://wiki.eclipse.org/JDT_Core/Java8#What_to_do_to_set_up_the_IDE indicate that I have to install the EE for JavaSE-1.8. However, the instructions don't specify how to get the EE.
Re: How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976693 is a reply to message #976679] Thu, 08 November 2012 19:38 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
For the time being, where neither OSGi nor JDT/UI support 1.8, please manually change your file <project>/.settings/org.eclipse.jdt.core.prefs to contain these lines:
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.source=1.8

HTH,
Stephan

PS: beware that all this is incomplete work in progress.
Re: How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976698 is a reply to message #976693] Thu, 08 November 2012 19:42 Go to previous messageGo to next message
Mohsen Vakilian is currently offline Mohsen Vakilian
Messages: 11
Registered: June 2011
Junior Member
Stephan,

Thanks! I just edited org.eclipse.jdt.core.prefs seconds before seeing the responses on this forum and stackoverflow.
Re: How can I get the execution environment JavaSE-1.8 in Eclipse? [message #976865 is a reply to message #976666] Thu, 08 November 2012 22:43 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
Thomas Schindl wrote on Thu, 08 November 2012 20:05

Ideally your EE and compiler settings are equal but that's not a must so
you can set your compiler Java8 and use the syntax.


Depends on the kind of experiment. The new default methods, e.g., require a new JRE for running.

And as soon as the new class file version is used (not yet) older VMs will not accept the class files we create from 1.8 sources.

best,
Stephan
Previous Topic:Importing large maven project is hanging on
Next Topic:Executing inline refactoring programmatically
Goto Forum:
  


Current Time: Wed Sep 24 00:42:31 GMT 2014

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

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