-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mvn spring-boot:run fails on Windows with "Could Not Find or Load Main Class" when path contains non-ASCII characters #43051
Comments
As far as I can tell, this is caused by the introduction of an I haven't managed to figure how to convince Windows that its default encoding is UTF-8 and that's what the JVM should use by default. Configuring I'm far from a Windows expert. @muellerarmin, perhaps you will have more joy in configuring Windows such that Java uses UTF-8 by default without any further configuration. Please give it a try and let us know how it goes. |
Thanks for the hints, @wilkinsona. Change System Locale to UTF-8 in Windows
Although this helped, I'm not sure if that is the best option, since it forces a system wide encoding change. Maybe a resolution on Spring Boot's side would be better (if possible)? |
I wonder if writing the arg file using |
That'd be my idea too, @philwebb. Maybe we can improve the argfile situation further by only writing it if the command length exceeds some kind of threshold. Then most of the time no argfile would be used, only if the classpath is really long. |
Using
prints
on my Windows machine. The |
JavaDoc of
In the JDK itself it's used in |
This seems to work. When using |
I've pushed something which should fix the issue. When the build is done, you can try with 3.3.6-SNAPSHOT. |
When having special characters in the path where the files are located (e.g. German umlauts (ä,ö,ü) or accents (é, è); example:
/c/Users/username/workbench/café/src/main/java/com/organization/test/Application.java
), the application will fail at the "attaching agents" stage with the error "Could Not Find or Load Main Class". This behavior starts at Spring Boot 3.3.0 and persists (at least) until 3.3.5. Versions 3.2.11 and previous (I tested versions 3.2.8 to 3.2.11) are not affected.Steps to recreate:
workbench/café/
)mvn clean compile org.springframework.boot:spring-boot-maven-plugin:run
)Further information:
The text was updated successfully, but these errors were encountered: