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):
- 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:
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?
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):
- 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:
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