[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Will Your Project Work When Running on Java 9?

Thanks Ed.

I will follow up on this with additional details later this week.

One important thing: you do not need JDT's Java 9 builds in order to run Eclipse with Java 9. This is only necessary if you want to test new Java 9 related functionality.


From:        Ed Merks <ed.merks@xxxxxxxxx>
To:        Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
Date:        08.03.2017 10:05
Subject:        [cross-project-issues-dev] Will Your Project Work When Running on        Java 9?
Sent by:        cross-project-issues-dev-bounces@xxxxxxxxxxx


Wayne recently blogged about Eclipse's Java 9 support:


Also, the planning council has been discussing the Oxygen release schedule with respect to Java 9 support:


Most projects are likely not doing anything specific to support the new feature of Java 9 so probably most of you aren't so concerned about what you need to do.  But it's likely that users will install Java 9 once it's released (in July) and that makes it likely users will try to run Eclipse itself with a Java 9 VM.  So the question is, will your project work when running on Java 9?  Probably, but maybe not.  I would strongly encourage you to test that!

Wayne's blog describes what you need to do.  To make testing even easier, I've automated the setup process with an Oomph Configuration.  What's a configuration you ask?


I've attached a configuration that does several things. 

You can try the configuration out with the latest installer.  Either update the one you have (from the menu in Simple mode or the toolbar button at the bottom in advanced mode) or download the latest one from:


To apply the configuration, you can drag and drop the email attachment to the title area of the installer (both in simple mode and advanced mode).  Alternatively you can save the configuration attachment and copy the file itself (or the contents of the file), to the clipboard, and then apply it (via the menu in simple mode or via the first toolbar button next to the search field in advanced mode).  If you're in simple model, applying the configuration will notice it has a workspace portion and will offer to switch to advanced mode, or will offer just apply the installation portion of the configuration.  You can do either.  Now you can proceed to choose a product (and optionally a project) to provision.

If you're using Java 9 for the first time, and you've only unzipped it so far, you'll need to make Oomph aware that your Java 9 JDK is available on your machine. 
Whatever steps you take, the result will be to launch an Oxygen product based on the platform's Oxygen Y build, complete with Java 9 early access support and running on Java 9 early access JVM.  If you choose a project as well, the workspace will be populated with all your source code using an Oxygen target platform also with Java 9 support and will be compiled against a Java 9 JDK.  So you can launch and debug, without changing your project setup at all.

Probably your project will work just fine, but don't count on it!  For example, Oomph uses a class derived from java.util.Properties in order to save properties files.  The implementation of that class is changed slightly in Java 9, with the net effect that any properties file we save ends up being empty, no stack traces or other visible symptoms of the failure point.  The overall effect was that any attempt to install/update anything in the IDE (or to produce an installation with the installer application) resulted in an empty config.ini.  As you can imagine, a corrupted config.ini prevents the installation from running.  So it was a pretty catastrophic failure!  Thank goodness it's already fixed, even for the next Neon release.

During testing I also see this stack trace in my Error log:

java.lang.reflect.InaccessibleObjectException: Unable to make field private static volatile java.net.Authenticator java.net.Authenticator.theAuthenticator accessible: module java.base does not "opens java.net" to unnamed module @26749efe
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:335)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:278)
    at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:175)
    at java.base/java.lang.reflect.Field.setAccessible(Field.java:169)
    at org.eclipse.epp.internal.mpc.core.util.ProxyHelper.getDefaultAuthenticator(ProxyHelper.java:116)
    at org.eclipse.epp.internal.mpc.core.util.ProxyAuthenticator.uninstall(ProxyAuthenticator.java:186)
    at org.eclipse.epp.internal.mpc.core.util.ProxyHelper.uninstallAuthenticator(ProxyHelper.java:69)
    at org.eclipse.epp.internal.mpc.core.util.ProxyHelper.releaseProxyService(ProxyHelper.java:60)
    at org.eclipse.epp.internal.mpc.core.MarketplaceClientCorePlugin.stop(MarketplaceClientCorePlugin.java:90)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:830)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:823)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
    at org.eclipse.osgi.container.Module.doStop(Module.java:636)
    at org.eclipse.osgi.container.Module.stop(Module.java:498)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588)
    at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
    at org.eclipse.osgi.container.Module.doStop(Module.java:636)
    at org.eclipse.osgi.container.Module.stop(Module.java:498)
    at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
    at java.base/java.lang.Thread.run(Thread.java:844)

I'm not sure what to make of that, but it suggests that MPC might well not function when running on Java 9.

So in the end, I think there isn't so much to worry about, but nevertheless, I strongly encourage each team to test their project's readiness so we can all avoid hassles and embarrassment when Java 9 is finally released.  I've tried to help make that as easy as possible...

Ed[attachment "OxygenJava9EarlyAccessBetaConfiguration.setup" deleted by Daniel Megert/Zurich/IBM]
cross-project-issues-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit