Transition Graal to Java 8
Gilles Duboscq
duboscq at ssw.jku.at
Thu Apr 3 14:23:34 UTC 2014
Those are only warnings and should be gone after revision 82971f397b94
(which was pushed last night).
-Gilles
On Thu, Apr 3, 2014 at 2:52 PM, Tom Deneau <tom.deneau at amd.com> wrote:
> OK now have a java8 enabled version of eclipse and ecj.jar
> eclipse-SDK-I20140402-0100-linux-gtk-x86_64.tar.gz
>
> I am getting the following kinds of errors from mx eclipseinit -e /path/to/eclipse
>
> incorrect classpath: /home/tom/java/oracle/jdk7-u51/jre/classes
> Compiling Java sources for com.oracle.truffle.api.dsl with JDT...
> ...
> incorrect classpath: /home/tom/java/oracle/jdk1.8.0/jre/classes
> Compiling Java sources for com.oracle.graal.api.replacements with JDT...
> ...
>
> -- Tom
>
>
>> -----Original Message-----
>> From: Doug Simon [mailto:doug.simon at oracle.com]
>> Sent: Thursday, April 03, 2014 1:31 AM
>> To: Deneau, Tom
>> Cc: graal-dev at openjdk.java.net
>> Subject: Re: Transition Graal to Java 8
>>
>> Gilles is right. A Java 8 enabled version of ecj.jar is mentioned in
>> step 4 of the instructions below.
>>
>> -Doug
>>
>> On Apr 3, 2014, at 7:51 AM, Gilles Duboscq <duboscq at ssw.jku.at> wrote:
>>
>> > Yes, it should work.
>> > This usually means that the eclipse/ecj you are using does not have
>> Java 8 support.
>> >
>> > -Gilles
>> >
>> > On 3 Apr 2014 00:15, "Tom Deneau" <tom.deneau at amd.com> wrote:
>> > Also, should the following still work?
>> >
>> > mx build --jdt mx/ecj.jar --jdt-warning-as-error
>> >
>> > I get
>> > Compiling Java sources for com.oracle.graal.test with JDT...
>> > Unrecognized option : -1.8
>> >
>> > -- Tom
>> >
>> > > -----Original Message-----
>> > > From: graal-dev [mailto:graal-dev-bounces at openjdk.java.net] On
>> Behalf Of
>> > > Deneau, Tom
>> > > Sent: Wednesday, April 02, 2014 5:02 PM
>> > > To: Doug Simon; graal-dev at openjdk.java.net
>> > > Subject: RE: Transition Graal to Java 8
>> > >
>> > > When I try mx eclipseformat -e /path/to/eclipse-4.4
>> > >
>> > > I get a lot of messages like:
>> > > The Eclipse formatter failed to format xxx.java. Skip the file.
>> > >
>> > > Is this still supposed to work?
>> > >
>> > > -- Tom
>> > >
>> > > > -----Original Message-----
>> > > > From: graal-dev [mailto:graal-dev-bounces at openjdk.java.net] On
>> Behalf
>> > > Of
>> > > > Doug Simon
>> > > > Sent: Wednesday, March 26, 2014 5:53 PM
>> > > > To: graal-dev at openjdk.java.net
>> > > > Subject: Transition Graal to Java 8
>> > > >
>> > > > The changeset[1] has just gone through that transitions the non-
>> pure-
>> > > > Truffle projects in the Graal repository to Java 1.8.
>> > > >
>> > > > The recommended steps for transitioning a local workspace are:
>> > > >
>> > > > 1. Ensure Eclipse is running on a 1.8 VM by editing eclipse.ini in
>> the
>> > > > Eclipse installation directory
>> (Eclipse.app/Contents/MacOS/eclipse.ini
>> > > > on Mac) to include these lines:
>> > > >
>> > > > -vm
>> > > > /path/to/jdk1.8.0/bin/java
>> > > >
>> > > > or on a Mac:
>> > > >
>> > > > -vm
>> > > >
>> > >
>> /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ser
>> > > > ver/libjvm.dylib
>> > > >
>> > > >
>> > > > 2. Ensure you are using an Eclipse that has 1.8 support. This is
>> one
>> > > of
>> > > > the following:
>> > > > - Luna (4.4), version I20140318-0830 or later
>> > > > - Kepler (4.3.2) with the patch at
>> > > > http://download.eclipse.org/eclipse/updates/4.3-P-builds
>> installed.
>> > > > Only select "Eclipse JDT (Java Development Tools) Patch with
>> Java 8
>> > > > support (for Kepler SR2)" unless
>> > > > you already have PDE installed.
>> > > > 3. Configure the JavaSE-1.7 and JavaSE-1.8 Execution Environments
>> > > > appropriately in Eclipse (Preferences -> Java -> Installed JREs ->
>> > > > Execution Environments) 4. If you want to build with ECJ, then
>> > > download
>> > > > it[2] to mx/ecj.jar 5. Update mx/env so that JAVA_HOME points to
>> the
>> > > 1.8
>> > > > JDK and add a property EXTRA_JAVA_HOMES to point to a 1.7 JDK.
>> > > > For example:
>> > > >
>> > > >
>> > > >
>> JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
>> > > >
>> > > >
>> > >
>> EXTRA_JAVA_HOMES=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Conte
>> > > > nts/Home
>> > > >
>> > > > 6. Do a complete clean (just to be sure):
>> > > >
>> > > > mx clean
>> > > > mx ideclean
>> > > > mx eclipseinit
>> > > >
>> > > > 6. Remove and re-add all projects in Eclipse.
>> > > >
>> > > > Note that it is not yet quite open season on using Java 8 language
>> > > > features as Checkstyle does not yet support Java 8. In all
>> likelihood
>> > > we
>> > > > will replace Checkstyle with error-prone[3]. Either way,
>> Checkstyle
>> > > will
>> > > > be pulled out soon which removes the last road block to adopting
>> all
>> > > of
>> > > > Java 8.
>> > > >
>> > > > -Doug
>> > > >
>> > > > [1] http://hg.openjdk.java.net/graal/graal/rev/a6c1c3eb20c4
>> > > > [2]
>> http://download.eclipse.org/eclipse/downloads/drops4/P20140317-
>> > > > 1600/download.php?dropFile=ecj-P20140317-1600.jar
>> > > > [3] https://code.google.com/p/error-prone/
>> > >
>> >
>> >
>>
>
>
More information about the graal-dev
mailing list