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!

This entry was posted in e(fx)clipse, Eclipse. Bookmark the permalink.

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

  1. Felipe Heidrich says:

    Thanks Tom!

  2. Pingback: Java desktop links of the week, May 20 | Jonathan Giles

  3. Pingback: JavaFX links of the week, May 20 // JavaFX News, Demos and Insight // FX Experience

  4. Sebastian says:

    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(
    at org.eclipse.jdt.internal.compiler.ast.ASTNode.isMethodUseDeprecated(
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(
    at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(
    at org.eclipse.jdt.internal.compiler.ast.Block.resolve(
    at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(
    at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.isCompatibleWith(
    at org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding.isCompatibleWith(
    at org.eclipse.jdt.internal.compiler.lookup.Scope.parameterCompatibilityLevel( ….

    Did you run into this before?



Leave a Reply

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

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.