Using Eclipse for development on OpenJFX8 and Java8 in general


If you are following the OpenJFX development you might already know that they switched their build to JDK8 and also started using Java8 language features in their codebase (defender methods, lambdas) – see the announcement.

The direct result of this change is that I’d have to switch to Netbeans or IntelliJIDEA to work with the code base which although not really nice would have been acceptable but there’s another problem with all this.

The e(fx)clipse code started to make use of JDK8 APIs and because we are subclassing JDK8/OpenJFX8 classes (e.g. collections) we got compile errors in our workspace, the same is true for our maven-tycho build.

The Java8 support is developed in an extra branch of JDT-Core and you can find informations about it on the wiki how to selfhost it. This would have allowed me to work around the development problem but I don’t think this is an acceptable solution for the months to come (until Kepler SR2!) so I’ve set up my custom CBI build where instead of building with JDT-Core from master I’m switching to the BETA_JAVA8 branch – you can find my shell script here.

For those who don’t want to run the CBI stuff their own I’ve also published complete SDKs (Platform+JDT+PDE) which I’ll update from time to time – if you know a certain fix went into the repo you can ping me e.g. on twitter (@tomsontom) to start a build.

Please note: The JDT stuff is very young code so don’t immediately file bugs when things don’t work. Consult the wiki on the status of the feature. Don’t spam the JDT-Team with bugs on stuff they have not yet developed!

About these ads

5 Responses to “Using Eclipse for development on OpenJFX8 and Java8 in general”

  1. Felipe Heidrich Reply May 15, 2013 at 2:47 pm

    Thanks Tom!

  2. Thanks Tom, you are literally the only one with a binary of Eclipse with Java8 support.

    Using your 5/19 build I still run into internal Eclipse compilation errors with Java 8 features:

    !ENTRY org.eclipse.jdt.ui 4 0 2013-06-27 10:04:37.261
    !MESSAGE Error in JDT Core during AST creation
    !STACK 0
    java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.ast.LambdaExpression cannot be cast to org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
    at org.eclipse.jdt.internal.compiler.lookup.Scope.isInsideDeprecatedCode(Scope.java:3237)
    at org.eclipse.jdt.internal.compiler.ast.ASTNode.isMethodUseDeprecated(ASTNode.java:490)
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:774)
    at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1001)
    at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:114)
    at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:281)
    at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.isCompatibleWith(LambdaExpression.java:478)
    at org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding.isCompatibleWith(PolyTypeBinding.java:37)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.parameterCompatibilityLevel(Scope.java:4239) ….

    Did you run into this before?

    Thanks!

    Sebastian

Trackbacks/Pingbacks

  1. Java desktop links of the week, May 20 | Jonathan Giles - May 19, 2013

    […] Schindl has made available builds of Eclipse that work with Java 8, which is really useful for anyone developing JavaFX now that it has switched to depending on some […]

  2. JavaFX links of the week, May 20 // JavaFX News, Demos and Insight // FX Experience - May 19, 2013

    […] Schindl has made available builds of Eclipse that work with Java 8, which is really useful for anyone developing JavaFX now that it has switched to depending on some […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 739 other followers

%d bloggers like this: