I downloaded the last Oxygen (3A) package from March 18' in order to trying Java 9. Using this tutorial, I was trying to get a grasp on the module.
However, in this tutorial, there is a checkbox that I do not have, while adding a source folder to a Java project:
[X] Create module-info.java (9 or higher)
I tried to get some patch on Java 9 compatibility for Eclipse, but failed. Indeed, on this page, the following message is shown to the user:
Note: This feature patch is disabled. It was originally intended to be installed on top of 4.7.1 builds.
The Help > About Eclipse window displays the following info:
Version: Oxygen.3a Release (4.7.3a)
However, it seems that it is not the case. I already installed a JDK 9 on my computer, and set those lines in my eclipse.ini file:
-vm
C:\Program Files\Java\jdk-9.0.4\bin\javaw.exe
-vmargs
--add-modules=ALL-SYSTEM
So Eclipse should run with Java 9 and give me the right options.
Am I missing something ? It looks not logical to me that they would remove this kind of checkbox.
It doesn't look like that option actually made it in to the Eclise Oxygen final releases. According to bug report 525374 it should be in Eclipse Photon (4.8).
You can create the module-info.java by right clicking on the Project and selecting 'Configure > Create module-info.java'.
Related
I am having problems adding the new JDK 9 Platform to Netbeans. Here are the steps I followed:
I downloaded Java 9 from here: http://jdk.java.net/9/ and ran the installations.
In Netbeans I went to Tools, then Java Platforms
Clicked on Add Platform
Selected Java Standard Edition
When asked to choose the platform folder selected "C:\Program Files\Java\jdk-9"
As Platform Source I selected "C:\Program Files\Java\jdk-9\lib\src.zip"
And for Platform Javadoc I filled in "http://download.java.net/java/jdk9/docs.api"
Now I see that if I click on the new JDK 9 platform Sources and Javadoc seem correct, but classes are empty. When I set a project to use the new JDK9 platform I get a lot of exceptions along the lines of "Cannot find package java.lang".
Who can help?
Thank you
Issue has been solved. The solution was to install Netbeans Daily Development Build instead of the Netbeans 8.2 that I use.
I haven't started my Eclipse Java EE Kepler in a while, and now it ended up with the following error on every project in my workspace:
http://i62.tinypic.com/30rsfgm.png
I'm not sure what happened here.
Due to a recent Java update, the JRE settings for the projects in Eclipse got unbound.
To fix this, one must set the current JRE on their computer as the JRE for the project library on the build path (This can also be found by going to the Problems tab, right clicking the error "unbound classpath container", then press Quick Fix):
http://i62.tinypic.com/5a438i.png
Then click on the JRE System Library, edit, and set it as an Installed JRE:
http://i58.tinypic.com/14vntqp.png
Alright so basically, I'm trying to run Eclipse with JavaFX, but then it gives me this error:
You are not running your eclipse instance with Java7 or Java8. The JavaFX tooling is disabled because of this.Make Java7/8 the default system java or adjust your eclipse.ini to pass -vm pointing to your Java7/8 install.
In case you want to turn off this check open your preferences and go to General > Startup and Shutdown and uncheck 'JavaFX Tooling Java Check'
Now I know it isn't pointing to the right SDK, but I have no idea how to change it, since I'm kind of new to this this stuff. I've already downloaded JDK 7.40 as well. I'm also using Ubuntu on a virtual machine, if that even matters anyway. Can anyone help me, I'd appreciate it.
Pre-requirements:
Install Java™ 8.
Install Kepler SR2 (4.3.2) .
The Kepler is still not supporting Java8. What to do?
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
Now jre8 is correctly located.
Now configure JavaFx
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/efxclipse/updates-released/0.9.0/site
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
It looks like the default java on your system is not java7. What do you get when opening a shell and execute java -version? Solution is to:
A) make java7 the default java
B) start eclipse with -vm
Apparently, you have installed 32bit Eclipse and 64bit JRE/JDK on a 64bit OS. Please use 64bit Eclipse and the problem will be solved. Please make sure JAVA_HOME And JRE_HOME is present in environment variables.
I had the same issue. I tried re-installing Eclipse, but it wouldn't work. I had to completely remove the project and delete all the project files. After that, I re-started eclipse and created the project again. However, this time I made sure the project path included the Java FX library as shown in the screen shot.
Java Build Path
I did this while I was creating the project and then I was able to create the project without any issues. Give this a try.
How can I get Java 8 to work with Eclipse?
I have followed this guide but doesn't work. I've also seen the Eclipse Java 8 wiki page, but they don't explain what to do with the checked out git repositories.
For Kepler SR2 (4.3.2) a feature patch needs to be installed in order to get JAVA 8 support. Follow these steps:
Eclipse - Help (MENU) > Install New Software...
enter the following URL into the 'Work with' field:
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
press 'Enter'
select category 'Eclipse Java 8 Support (for Kepler SR2)'
click 'Next'
click 'Next'
accept the license
click 'Finish'
restart Eclipse when asked
source: link
#Elisabeth
In order to have the desired JRE/ JDK on BuildPath, follow these steps.
Right click on Project from Package Explorer
Select BuildPath and then select Configure Builpath
Select Libraries Tab from the popped up Properties window
Select the current JRE System Library
Click Remove button
Click on Add Library button
Select JRE System Library
There you will be able to add your desired JRE/ JDK version using 3 different methods.
If you don't find your desired version of JRE/ JDK there in those 3 options, then you will have to install that first. The following link helps you in detail with screen shots to do the same. Hope it helps.
source: link
As written in https://wiki.eclipse.org/JDT_Core/Java8 :
"Starting with I20140318-0830 all our Luna (4.4) builds contain the Eclipse support for Java™ 8. For Kepler SR2 (4.3.2) a feature patch is available. "
So right now you need to download a non stable eclipse release.
Go to :
http://download.eclipse.org/eclipse/downloads/
There download a release older than or equals to I20140318-0830
Then you choose your version according to your OS :
click on the (http) link, the download will start :
Note that according to eclipse website :
Java™ 8 has not yet landed in our standard download packages. But you can add it to your existing Eclipse Kepler SR2 package. It will be included in the Luna packages starting with M7 on May 9/2014.
so after May 9/2014 getting eclipse working with java 8 will be simpler.
Now that Java 8 has shipped, Eclipse has released support for it. Java 8 is available as an 'update' for Eclipse Kepler (Eclipse 2013 release) and is available in integration / nightly builds towards Eclipse Luna (Eclipse 2014 release). For more information about enhancements and how to install it in your current version of the IDE, see http://eclipsesource.com/blogs/2014/03/25/eclipse-support-for-java-8/
It appears that this is still very much a work in progress (hence, there will be stability issues). Is there a particular reason you want to use Java 8?
This explains what you should be doing:
Checkout the BETA_JAVA8 branch of the following git repositories:
JDT/Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
You need to install a JDK8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
As API Baseline, use 3.8 (or 3.8 RC4 until 3.8 is released).
I have not downloaded this repo, but I would assume it contains the eclipse jdt core (as the name states). I would just wait until a stable release is finished.
As already stated here:
The Kepler release does not include Java 8 support, as Java 8 still isn't released yet. Try again with the next Eclipse release or use Eclipse beta releases like the one by e(fx)clipse. Have a look at this bug report from time to time for progress on Java 8 in Eclipse's JDT.
EDIT: Starting with I20140318-0830 all Luna (4.4) builds contain support for Java 8. The final version of Eclipse Luna (4.4) will be released at the end of June 2014. For Kepler SR2 (4.3.2) a feature patch needs to be installed.
Link to the Eclipse Java 8 support Update site
https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler
For Eclipse Mars.1 Release (4.5.1) you have to download extra package with
jre-8u73-windows-x64.tar.gz
to your java8/jre folder and point it in -VM section in eclipse.ini. It works for me.
I'm using JCreator to work with Java. I got this exception (or maybe error?) it says the following:
major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
I downloaded the last version of Java SE, but that didn't work.
By the way, Java files compile fine and also run without any problem. But I have downloaded a file that my instructor has upload with many java classes and this message appears when I try to run the class that has the main method.
I've never used JCreator, but a little bit of Googling gave me this page of JCreator installation instructions, which has the following instructions for manually setting the JDK that JCreator uses:
Starting JCreator Without Using the Setup Wizard
With JCreator active, open the Options window from the Configure menu.
Click the JDK Profiles option.
Click the default item in the list, and click Edit.
Ensure that the Name field shows the correct version of the selected JDK directory; in this case, JDK version jdk1.6.0. [ That's a typo I think ... ]
Set the JDK Home path by clicking the Browse button next to this field.
Browse to the root directory of the JDK installation: C:..\jdk1.7.0. Click OK.
Click the Documentation tab, and Add the path: C:..\jdk1.7.0\docs. Click OK.
Close the windows.
Yours is a slightly different scenario, but I think these instructions should also work for changing the JDK for an existing installation of JCreator.
(Use the pathnames of your latest JDK installation ... obviously.)