Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 381345

Summary: [1.8] Take care of the Java 8 major version
Product: [Eclipse Project] JDT Reporter: Satyam Kandula <satyam.kandula>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jesper, manoj.palat, stephan.herrmann
Version: 3.8   
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 380190    
Attachments:
Description Flags
Patch for 1.8 support in JavaCore none

Description Satyam Kandula CLA 2012-06-01 07:00:52 EDT
Current java8 beta versions generate classes with major version 51. java 7 also used version 51. The tests uses the same constant to make an explicit run of the java versions. Assuming that some of the next beta versions could change the version to 52, I have changed the constant to 52 with the fix for bug 380106. However, while writing the class files it writes the version as 51. 
Whenever java8 moves the version number to 52, we should change this version too.
- Look at Todos in CodeSnippetClassFile.java and ClassFile.java
Comment 1 Jesper Moller CLA 2013-01-17 06:18:00 EST
FYI: At least as of 1.8.0-ea-b72, java8 uses version 52
Comment 2 Stephan Herrmann CLA 2013-01-31 18:30:55 EST
Yep, since we're targeting b73+ now, we need to create class files using version 52.

I've pushed the changes recommended by Satyam via commit 575e58be0448bede94ba905837e2b6fe920027f7.
Comment 3 Stephan Herrmann CLA 2013-01-31 18:31:55 EST
*** Bug 399571 has been marked as a duplicate of this bug. ***
Comment 4 Jesper Moller CLA 2013-02-16 15:38:53 EST
Created attachment 227159 [details]
Patch for 1.8 support in JavaCore

Shouldn't we also add the 1.8 support to JavaCore? It's kindda required for JDT/UI work, isn't it? Or should this be a separate bug?
Comment 5 Srikanth Sankaran CLA 2013-02-16 20:09:20 EST
(In reply to comment #4)
> Created attachment 227159 [details]
> Patch for 1.8 support in JavaCore
> 
> Shouldn't we also add the 1.8 support to JavaCore? It's kindda required for
> JDT/UI work, isn't it? Or should this be a separate bug?

I fixed a bunch more places needing this change and released the fix
here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=63b001f83264125c7dd42160689ada7c16b8afb5.

Thanks!