Java Community | Help. Code. Learn.JC|HCL
Java Community | Help. Code. Learn.โ€ข4mo agoโ€ข
9 replies
Loydiee

Maven archetype quickstart issue with JDK 25?

I'm new with using Maven (Via IntelliJ IDEA), and I found maven archetype quickstart (v.1.5) as the most recommended 'quickstart' for projects. I tried it and it worked successfully - src folders and pom.xml generated, but it uses JDK 17. I did some google search and I found that archetype quickstart only 'supports' up to JDK 17.
Now, I'm trying to make it work with JDK 25.

Keep in mind I have no knowledge with Maven, but I want to use it to finish a simple project of mine (learning Maven properly will come after this as I'm on a deadline).

In my pom.xml, I configured the compiler plugin to use JDK 25 (suggested by GPT):
<groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.13.0</version>
          <configuration>
              <source>25</source>
              <target>25</target>
              <release>25</release>
          </configuration>



- In IntelliJ's Build, Execution, Deployment>Java Compiler settings I have set the Project bytecode version and Target bytecode version to use 25
- Project Structure: Language level set to 25
- Modules: Language level set to 25
- Modules>Dependencies: Module SDK set to JDK 25
- Path Environment and JAVA_HOME are also properly configured as I've tested and used it prior to using Maven

However, whenever I try to run the program, the program generates this error:
java: Cannot start javac process for enhanced-inventory-management: it is configured to use JDK 0, but IDE supports compilation using JDK 7 and newer only.
Consider associating the module with a supported JDK version. Note, that it is possible to keep the current Java language level to make produced *.class files compatible with Java 25 even when they are compiled by a newer compiler version.


It only happens when I try to use JDK 25, but it successfully run when I use the default version which is JDK 17.
What am I doing wrong here? Is it not possible to run with JAVA 25?
pom.xml3.37KB
Was this page helpful?