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.DaniFrom:
Ed Merks <ed.merks@xxxxxxxxx>To:
Cross project issues
Will Your Project Work When Running on Java
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.
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:
- The installation portion of the configuration
- adds a p2 task to reference the platform's Y build update
site, i.e., the builds that contain JDT's early access Java 9 support (so
whatever product you install, it will consider installing it from the Y
- and adds the --add-modules VM argument to the eclipse.ini
(so launching will actually function).
- The workspace portion of the configuration
- redirects the 4.7 I builds URL to the 4.7 Y builds URL,
so if you using Oomph's targlets to provision your target platform, and
provision an Oxygen target platform, it will provision one that uses the
4.7 Y builds, so you can debug launch your project code with a Java 9 IDE,
- and creates a JDT "Installed JRE" that
references a Java 9 JDK, and that includes the --add-modules VM argument
so you can launch a self hosting IDE running on Java 9.
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.
- In simple mode you can do this as follows. Choose
whatever product you want to install on the first page. On
the second page, choose the "Oxygen" version of that product.
For the Java VM choice, use the folder button to open the Java Virtual
Machines dialog and use the Browse button to locate the Java 9 JDK on your
file system. Once it's displayed, make sure it's selected and
hit OK. This will create an Oxygen installation of whatever product
you've chosen, configured to use a Java 9 VM along with the right VM arguments
so it can actually launch successfully.
- In advanced model you can do this as follows.
Choose whatever product you want to install on the first page and choose
the Oxygen Product Version. Use the folder button next to the Java
VM choice and use the Browse button to locate the Java 9 JDK on your file
system. Make sure it's selected in the combo box. Advance to
the next page (Project page). Here you can choose your Project setup.
If you don't have one, I'll bet your project doesn't have a lot of external
contributors and I'll bet that you spend a lot of time on manually setting
up your workspace. I typically choose the Oomph project (or
EMF project) on the Project page, and then I advance to the Variables page
to select the Oxygen target platform for testing against the latest platform
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
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...
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