In IntelliJ 2017.2.2 I am able to run a Vaadin 8.1.2 app (brand-new vaadin-archetype-application
archetype) with Tomcat 8.5.20 under Java 9+181 if the Pro
Inlined as timeline
To get to the root cause for your case specifically, we would surely need more details to what you've tried in terms of code definitions.
On 22 August 2017
Yes.You can make this specific combination work. After solving the problem where I was Unable to process file module-info.class within a Java9 project results in ClassFormatException I could get the war created using mvn package
to run with tomcat finally.
Details: You need to use a Java 9 compatible version of Tomcat. (apache-tomcat-9.0.0.M26
in my case) and configure it to start with
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/
Once the server is started, you can access the application @ localhost:8080/vaadinjavanine/
where vaadinjavanine is the war file name within my tomcat's webapps folder.
On 21 August 2017
The answer specific to the combination sadly is still No. I believe it's not yet possible to make this combination work.
Jetty Server
Here's a sample application updated by me which works with IntelliJ + Vaadin + Jetty on my localhost:8080
using Jetty server, irrespective of my Project SDK being set to Java1.8 or Java9. It works something like this:
This was attained after overcoming the #jetty.project/1758 by upgrading to the 6.0_BETA
of asm
and asm-commons
libraries and using the custom 9.4.7-SNAPSHOT built on my local used in the project(commit - #e34415.)
Tomcat Server
Following the recommended way of creating a war, I 've created the application war(in my case <finalName>vaadinjavanine</finalName>
) using the command:
mvn package
Made sure that the CATALINA_HOME/webapps included this file. Copied it basically.
localhost:8080/vaadinjavanine/
But have ended up finding another issue in the current chain: Unable to process file module-info.class within a Java9 project results in ClassFormatException
On 20 August 2017
The answer to the question is No. What I did was, tried out creating a maven based vaadin application from scratch based out of java9, following the getting started guide. Using the following configurations:
apache-tomcat-8.0.22 intelliJ-IDEA 2017.2.2 <vaadin.version>8.1.2</vaadin.version> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:09:06+05:30) Maven home: /usr/local/Cellar/maven/3.5.0/libexec Java version: 9, vendor: Oracle Corporation (jdk-9+181)
Created a maven module using the vaadin-archetype-application
as shared in the guide shared. Updated
pom.xml with
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
Added a module-info.java to the module under development.
I was able to execute mvn package
on the same but running mvn jetty:run
to run the application ended up achieving MultiException | java.lang.RuntimeException: Error scanning UI and Servlet class