1

Java 9 and later implements the Java Module System (Project Jigsaw).

Can I build a modular app using Vaadin Flow?

Are there any technical issues specific to Vaadin one should be aware of when attempting this? (Not asking about issues writing modular code in general, only asking about Vaadin+Jigsaw issues.)

Naman
  • 27,789
  • 26
  • 218
  • 353
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
  • Wouldn't that be too broad for SO? Would ideally expect one to give it a try once and then maybe pose the challenges faced. Just to recall a previous question about compatbility - https://stackoverflow.com/questions/45766064/run-vaadin-8-1-app-under-java-9-prerelease-in-intellij-2017-2-2 – Naman Feb 16 '19 at 03:23
  • @nullpointer When a simple "Yes" or "No" answer will suffice, I don't see how it is “too broad”. As for the Question you linked, Vaadin 8 is different project with a different codebase and a different architecture (Web Components, not GWT). Also, that Question was about compatibility with Java 9, without necessarily writing code in modular Java. This question is specifically about writing a web app in modular Java code while calling on Vaadin. – Basil Bourque Feb 16 '19 at 03:56

1 Answers1

2

Current versions of Vaadin are not directly compatible with Jigsaw. The main problem is extensive use of reflection across module boundaries. Fixing those would require using API that is not available in Java 8 and would thus either require making things complicated or increasing the required Java version.

Vaadin can of course still be used with Java 9 and later, but it needs to be on the classpath instead of the module path. It might even work if your own application classes are on the module path while the Vaadin classes are on the classpath. I haven't tested that in practice.

Leif Åstrand
  • 7,820
  • 13
  • 19