I'm trying to run an app generated by JHipster 5.7. When I try to run the mnvw
file, I get:
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
You are running an incompatible version of Java. JHipster requires JDK 1.8
followed by a string of errors and a failure to run. I am indeed using JDK version 11. I've found some seemingly relevant information online but it's very difficult for me to really understand what any of it means, or even be entirely sure if it's relevant to my problem.
To avoid an XY problem I'm just going to ask my question in the most general, nooby way possible: how can I run a JHipster 5 app on Ubuntu (18.10) when I have JDK 11 installed? (If the answer is to install a different version of Java this is fine, but I don't know how to do this or how to tell JHipster to use that version).
Am testing my generated app with Java 11 and it works without problems.
Just update the pom like this :
<java.version>11</java.version>
<spring-boot.version>2.1.2.RELEASE</spring-boot.version>
Add jaxb dependencies :
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
Comment or Remove maven-enforcer-plugin requireJavaVersion rule.
My Env : Windows 10 64-bit, OpenJDK 11.0.1 64-bit, Apache Netbeans 10, Maven 3.5.2, Spring Boot 2.1.2.RELEASE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With