Java 9 Support (BETA) for Oxygen Eclipse Project

Details Group Tabs

flastnamem4l's picture

i tried to install on neon2,neon3,oxygen m1 to m7,every time failure!but use

download dot eclipse dot org/eclipse/downloads/drops4/P20170519-0945/

to download and install by offline way,every time success! java ee and java se version~

we can also choose version as follows:

ftp dot acc dot umu dot se/mirror/eclipse.org/eclipse/updates/4.7-P-builds
https colon double slash ftp double gnome dot org/mirror/eclipse.org/eclipse/updates/4.7-P-builds
cdimage dot debian dot org/mirror/eclipse.org/eclipse/updates/4.7-P-builds

revansbre's picture

Will not install with Oxygen  4.7RC3.   Install new software from update site (http://download.eclipse.org/eclipse/updates/4.7-P-builds) gives "There are no items available" and install from Marketplace client gives:

The following solutions are not available: Java 9 Support (BETA) for Oxygen 4.7

If you tjen attempt the install it fails with no error in the .log

revansbre's picture

Works now.

revansbre's picture

I've added Java 9 support to Eclipse 4.7M4 and I'm trying it with some existing code. One class has an illegal import from a sun. package. This is not shown as an error in the editor, just a marker.

dmegert's picture

Please don't report bugs here. Instead file a bug report against JDT Core with steps to reproduce.

dmegert's picture

I'm not sure what you mean. Markers are used to show errors and warnings. Please file a bug report against JDT Core with an example.

revansbre's picture

The import is:

import sun.security.x509.X500Name;

and the imported is used later on in the code. Neither location is flagged as an error.

dmegert's picture

Please don't report bugs here. Instead file a bug report against JDT Core with steps to reproduce.

chennick's picture

If your sun.* classes are in the following list, they can still be used -- just write a modupe-info.java in your source root and make sure your module declares "requires jdk.unsupported;" sun.misc.Unsafe, sun.misc.Signal, sun.misc.SignalHandler, and sun.reflect.ReflectionFactory.

chennick's picture

My project contains multiple modules, and I'm getting this error:

Description Resource Path Location Type
The project was not built due to "Build path contains duplicate entry: 'module-info.java' for project 'Sunset'". Fix the problem, then try refreshing this project and building it since it may be inconsistent Sunset Unknown Java Problem

How do I fix this?

dmegert's picture

Currently one project corresponds to one module. You have to refactor it into multiple projects. If you disagree with that, please open a bug report against JDT Core.

chennick's picture

Thanks! Creating a new project for each module seems to have fixed that error message. (It'd be nice if there was a way to automatically create a project for every subfolder of a given folder, and make them all into a new working set.) But now, I'm getting this error once per project:

Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project sunset.classloader Unknown Java Problem

The error persists even after manually applying the org.eclipse.jdt.MODULE_PATH workaround, restarting Eclipse and cleaning all the projects. What's wrong now?

dmegert's picture

I can't tell from here what's wrong. Please file a bug report against JDT Core with an example project.

ekolotyluk86r's picture

When launching Eclipse, after choosing the workspace I get

An error has occurred
See the log file /Users/eric/documents/workspace/.metadata/.log

I appended the following to the config.ini file
-vmargs
-addmods java.se.ee

but I still get the same error

!ENTRY org.eclipse.osgi 4 0 2016-12-23 14:14:47.551
!MESSAGE Application error
!STACK 1
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct

dmegert's picture

-addmods was used by older Java 9 versions. These days you have to use --add-modules=java.se.ee as explained above.

ekolotyluk86r's picture

I have added modules=java.se.ee as explained above, and the effect is still the same: An error has occurred, see the log file.

The only way I can get Oxygen to launch is to add this to the Shortcut Properties in Windows.

dmegert's picture

> I have added modules=java.se.ee as explained above

Nothing above says that this is what you need to do. You need to add --add-modules=java.se.ee (assuming you are using a recent Java 9 version).

erabii's picture

I'm on Mac OS, Fresh Install of Neon + http://download.eclipse.org/eclipse/updates/4.6-P-builds/.
First as already noted by some bug, Eclipse neon.1 (4.6.1) does not start under JDK-9. So the only way to start it is via :

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin

in eclipse.ini

Now it starts.
Things I am looking at :
Eclipse -> About Eclipse -> Installation Details -> Eclipse JDT Patch with Java 9 is installed.
Eclipse -> Preferences -> Java Compiler -> No option for JDK-9.

Bummer.

Fresh install of Eclipse Oxygen. It starts with JDK-9 with default configuration.
Things I am looking at :
Eclipse -> Preferences -> Java -> Compiler -> 9 (BETA) is there. I select it.
Eclipse -> Preferences -> Java -> Installed JRE's -> Installed JRE Location no longer Exists. JRE will be removed.

Again, it does not work.

Can anyone provide any details on how this is supposed to be configured?

Thx,
Eugene.

dmegert's picture

Sorry for any inconvenience. Java 9 is still moving and the latest Java build 149 had breaking changes (new keywords and new class file format. We have uploaded a new feature patch that solves that issue. Please give it a try!

mpalat's picture

mkeller's picture

The update site http://download.eclipse.org/eclipse/updates/4.6-P-builds/ now works with Neon (4.6) RC4 and later builds.

mzimmermann's picture

I did not manage to add Java9 support to the Eclipse Scout M7 EPP via Marketplace (as described above) or via P2 update site http://download.eclipse.org/eclipse/updates/4.6-P-builds/

Error messages:
* org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at http://download.eclipse.org/eclipse/updates/4.6-P-builds.
* No repository found at http://download.eclipse.org/eclipse/updates/4.6-P-builds/P20160308-1615.

uhofstetter's picture

i am getting errors when i try to compile a simple hello world program. described the problem on stackoverflow
search for eclipse-mars-support-for-java9-build-path-settings

mhernandezm7f's picture

hello
good morning to all
Try to fill your new ide to test the Java version 9, but was useless.
Will not let me create a class of any kind.
I get the error provider "jrt" not found
It is that the JDK version 9 because there is no jre.
As you work on this version of Eclipse projects.
Thank you very much for your time and dedication.

jarthanaree's picture

Hi Mario,

Eclipse Mars does not include support for Java 9. That's where this update (Eclipse Java™ 9 Support (BETA) for Mars) is needed. Please update this on top of existing Mars update, that should help. Also please make sure you run the IDE with JRE 9, which provides the JRT implementation.

Regards,
Jay