r/javahelp • • Jul 22 '25

IntelliJ throws InvalidPathException: Illegal char ‘<’ when running Spring Boot app (but works via terminal)

Hi folks,

I'm working on a Java 17 project using Spring Boot 3.2.5, Maven, and IntelliJ IDEA (latest version). The app builds and runs fine using the terminal:

mvn clean install -DskipTests
mvn spring-boot:run

However, when I try to run the application from inside IntelliJ (green run button or Run > Run…), it throws this error:

Internal error (java.nio.file.InvalidPathException): Illegal char <


⸻

What I’ve tried so far:
	•	Verified my JAVA_HOME and MAVEN_HOME are set correctly
	•	I’m using Oracle JDK 17 (java -version confirms)
	•	Reimported the Maven project from pom.xml
	•	Cleaned .idea, *.iml, out/, and target/ folders
	•	Rebuilt the project
	•	Verified that no file or folder contains the < character (used findstr "<" to search)
	•	Checked all XML files and config paths (compiler.xml, dataSources.xml, etc.)
	•	The project works perfectly if I run it outside IntelliJ

Context:
	•	Spring Boot 3.2.5
	•	JPA, PostgreSQL, Devtools, Lombok
	•	IntelliJ Ultimate

⸻

My question:

Has anyone ever seen IntelliJ throw this InvalidPathException due to some hidden config file or internal path corruption?

Any idea where to look next? I’ve cleaned everything I could think of.
1 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jul 23 '25

I already tested it with the bundle and it didn't work

1

u/pronuntiator Jul 23 '25

What does mvn -v outside IntelliJ print vs. inside IntelliJ using "run anything" (usually double control)?

1

u/[deleted] Jul 23 '25

Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b) Maven home: C:\dev\maven Java version: 17.0.12, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17 Default locale: pt_BR, platform encoding: Cp1252 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

No inteliij: medicflow [-v]: At 23/07/2025 12:59 com um ícone vermelho de erro