Search code examples
spring-bootjava-8jhipster

Create JHipster application for Java 8 instead of Java 17


I created an application using JHipster. By default, it created for Java 17. But I need for Java 8. Is there any way to create application directly for Java 8 instead of Java 17?

I know that after downloading, we can change the version inside the project code. But wanted to know if there's an option to directly obtain the app for Java 8.


Solution

  • Spring Boot requires the Java versions that JHipster uses. For example, Spring Boot 2 (used in JHipster 7) requires Java 11. JHipster 8 requires Java 17 because Spring Boot 3 requires it.

    This will create an app that requires Java 11:

    npx generator-jhipster@7 --defaults
    

    You might be able to use JHipster 6. However, it's over three years old and not recommended from a security perspective.