Java 9 Support for Oxygen Eclipse Project

Details Group Tabs

ikordal's picture

Cannot be installed on a fresh Eclipse installation.

I get this error:

No repository found at http://download.eclipse.org/eclipse/updates/none.

dmegert's picture

Java 9 is now part of Oxygen 1a and also Photon M3. The Marketplace install is no longer needed and has been retired.

lmengoni's picture

I get this error when I try to install from market place:

org.eclipse.equinox.p2.metadata.repository
Error
Sat Oct 28 10:27:29 CEST 2017

No repository found at http://download.eclipse.org/eclipse/updates/none.

May be the url is wrong?

 

 

 

dmegert's picture

Java 9 is now part of Oxygen 1a and also Photon M3. The Marketplace install is no longer needed and has been retired.

sherrmann's picture

Attention: if you previously installed the BETA version of Java 9 Support, you should either start with a fresh new installation, or at least uninstall the BETA Patch / ensure that the following feature is no longer installed:

  • "Eclipse JDT (Java Development Tools) Patch with Java 9 support (BETA) for Oxygen development stream"

Failure to do so may cause the older path feature to override newer installed plugins.

cvien's picture

After I installed Eclipse Oxygen.1 Release 4.7 and JDK 9+181 on Linux Mint Cinnamon (Ubuntu) Sonya,

see bug reports regarding --add-modules=ALL-SYSTEM for this and cf: StackExchange regard ibid.

I opened Help   ->   Eclipse Marketplace ...   ->

<typed in> Java 9 <enter>   ->   <selected> Install [button]   ->

Confirmed | Finish | Update Installation  ->   Accepted License Agreement   ->  

***(IMPORTANT STEP:)*** <then waited for the full installation to finish::
                                                   progress bar is hidden on bottom right of workspace [hard to see]>   ->

<Eclipse prompts for restart> Accept   ->   <should work automatically now>

 

To review: make sure you Install Java 9 Support for Oxygen 4.7 as many people have said, but I add make sure you *wait* for the full installation to complete before closing the window!

 

glovato's picture

Seems like today mirrors are not up-to-date with yesterday snapshost as install fails. Many JDT files at http://download.eclipse.org/eclipse/updates/4.7-U-builds/U20170927-0115/... return 404 (e.g. org.eclipse.jdt.core_3.13.50.v20170926-1643.jar).

dmegert's picture

There were issues in the mirroring code, see https://bugs.eclipse.org/517294. This should work now.

reginakagan's picture

Hi,

What is the repo url for mirroring with tycho plugin or using the p2 mirrorApplication?

zsalehi's picture

I have the same issue mentioned earlier. It breaks maven regardless of which version of Maven or JDK I use.

sasinha's picture

It is fixed now. You can run Maven with Java8 now.

arhl's picture

I tried the plugin a week ago when it was still named "beta" with the latest early access Java 9 build, but today after the release of Java 9 it does not work. 

First of all it does not smoothly installs as before, complaining about existing Eclipse components, even though it was a freshly downloaded Eclipse and with following the steps above.

And then, it still states "Target is not a JDK root. System library was not found." when trying to add a JDK.

 

dbasunni's picture

I am using eclipse Oxygen 4.7 and in the step of create source module, I am not getting checkbox to crate a module -info descriptor file.

Please help

mpalat's picture

Can you please try out with the latest version and try? You can try using the project context menu -> configure -> create module-info to get a default module-info.java file for a starter. Please report a bug if you hit any issues.

Thanks,

Manoj

mdudley3mh's picture

As soon as I installed Java 9 support I get this error running maven:

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

note: this error is always the same no matter I use different JDK to run maven.

revansbre's picture

Reading the introduction above, I think this is not possible, but want to check.  Is is possible to add extra modules to the build path of a poject?  Or limit the modules visible? Quick tests show that modiles in java.se.ee but not java.se are visible to projects by default.  How do I restrict to just java.se modiules?

sherrmann's picture

Support for add/limit modules has recently been added, see https://www.eclipse.org/eclipse/news/4.7.1a/

Towards the end it describes how double-clicking "Is Modular" opens a dialog for modularity details, where tab "Contents" lets you select which modules are included (explicitly, or implicitly as dependencies of the former).

Note, that the linked document is work in progress, and also the implementation is still being finalized for the Oxygen.1a release scheduled for Oct. 11.

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