Community
Participate
Working Groups
In NewJavaProjectWizard#getDefaultEEName() the last line of code returns "JavaSE-1.6" as the default EE to select for new projects. When self-hosting with the Sun 1.7 JRE (that is the only JRE available to JDT), I try to create a new java project. The default JRE setting is to use the 1.6. This seems incorrect as I must change the project properties as soon as I start using Java 7 structures. If the default EE is supposed to be the highest available, the method should be updated to reflect that. Alternatively, perhaps we can improve the code at line 583 to match better. Currently it checks to see if a default VM is set for any of the execution environments that match the default vm install. We could also check to see an EE is a 'perfect match' to the default vm install.
This works fine for me. Make sure you have all relevant projects in your install. It looks like the org.eclipse.osgi is not the one needed for Java 7. If this is not the case then please reopen with more detailed steps to reproduce.
I can still see this using the N20110707-1400 build from the Java 7 branch. Steps: 1) Download the build from the Java 7 build site 2) Launch Eclipse with the vm argument pointing to a Sun 1.7 VM 3) Select a new folder for your workspace (clean workspace) 4) File > New > Java Project Result: Default JRE setting is stil JavaSE-1.6 Debugging the same steps shows that the last line of getDefaultEEName() inside NewJavaProjectWizardPageOne.java is getting hit which returns the string "JavaSE-1.6".
>1) Download the build from the Java 7 build site There is no official site with Java 7 builds. I have no clue where you got N20110707-1400. You have two official ways: 1) 1. download R3.7 or R4.1 2. start new workspace 3. install Java 7 support, see: http://wiki.eclipse.org/JDT/Eclipse_Java_7_Support_%28BETA%29 4. restart with a new workspace using a Java 7 JRE 5. create a Java project 2) 1. have a workspace (e.g. from a 3.7 target) 2. load Java 7 support from CVS, for details see: http://wiki.eclipse.org/JDT_Core/Java7#What_to_do_to_set_up_the_IDE 3. start a target workspace with a Java 7 JRE 4. create a new Java project in the target I just tried both scenarios again and it works fine for me. If you still see this then please provide more detailed steps on how to reproduce the problem.