/ Eclipse

Vaadin Eclipse plugin with Java 8

Java 8 has just been released and it is now becoming the default Java implementation on many platforms. Unfortunately Eclipse has yet to become fully Java 8 compatible which means you might encounter some strange behaviour when creating Vaadin applications with the Vaadin plugin. There are a few pitfalls you need to be aware of.

Downloading Eclipse

First of all you need an eclipse version downloaded and installed. You can do that from http://eclipse.org/downloads Be sure to select Eclipse Kepler (4.3.2) SR2 version and the Eclipse IDE for Java EE Developers package. That will give you the best results.

Enabling Java 8 Support

As I said before, the default eclipse distribution does not come with Java 8 support build in. To add that open up Help->Eclipse Marketplace and type in Java 8 support in the search box. You should see the following:

Eclipse Marketplace

Select Install in the Java 8 Support for Eclipse Kepler SR2.

You now have basic Java 8 support.

Java 8 Facet

But we are not yet done. Vaadin applications are web applications and to use them we need to another Java 8 patch to eclipse. So again, open up Help->Eclipse MarketPlace and this time search for Java 8 facet. You should see the following:

Eclipse Marketplace

Select Install in the Java 8 Facet for Web Tools for Eclipse Kepler SR2.

You now have support for Java 8 web applications.

Creating a project with the Vaadin Eclipe plugin wizard

The Vaadin ecliplse plugin doesn't yet either support Java 8 particularly well, but we can get it to work with a few configurations.

Start by creating a new project by selecting File->New->Other->Vaadin 7 Project. You should see the following dialog:

New Vaadin Project

Give your project a name and click on the Modify button in the Configuration section.

Java 8 Facet

Change the Java version to 1.8 and click ok. Click finish and your project should be created.

**Congratulations, you now have a fully working Java 8 Vaadin project!