National characters in program path?
I am creating from scratch the simplest Hello world Java program in IntelliJ. If the program path contains national characters compilation/running of the program fails with the following error:
Error:Internal error: (java.io.IOException) Cannot find IntelliJ IDEA project files at C:/Home/JaĹ›/test
java.io.IOException: Cannot find IntelliJ IDEA project files at C:/Home/JaĹ›/test
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:93)
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:39)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:34)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:77)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:274)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)
Please perform full project rebuild (Build | Rebuild Project)
The above-mentioned rebuild project command does not help (the same message appears). Exactly the same project created in a folder without national characters in the path works without a problem. Is there a way to have national characters in a program path under IntelliJ Java?
Detailed data:
System: Windows 10 Pro/64bit
IntelliJ version: 2020.1.1 (Ultimate edition)
Java 13
Steps to recreate the problem:
In IntelliJ: File>New>Project>Next>Create project from template (Command Line App)>Next>in Project Location enter a path with national characters (like C:\Home\Jaś\test)>Finish>OK>This Window> enter System.out.println("Hello World"); as main method body>Build>Build Project
Any help would be appreciated, the folder names with national characters are important to me :).
Best regards
Please sign in to leave a comment.
Do you have the correct locale configured?
Control Panel | Clock and Region | Change date, time or numbers format | Administrative | Change system locale
Dear Serge, thank you for your answer!
Yes, I set it to my locale (Polish). I also selected the 'Beta: Use Unicode UTF-8 for worldwide language support' option.
Best regards!
Can you try unsetting the beta option and reboot?
It will take a while, since my computer works 24/7 (with quite a few projects open) I cannot reboot it easily. But I'll try to recreate the problem on other computer and then change that option. I'll try respond today.
Thank you for your immediate responses!
Dear Serge,
it seems that you hit the nail on the head! I tested on the other computer and changing that option there removes the problem! I will test also on my computer as soon as I will be able to reboot, but I am sure it is the solution!
Thank you once more for immediate and right solution!
You should also check IDE encoding settings: http://blogs.jetbrains.com/idea/2013/03/use-the-utf-8-luke-file-encodings-in-intellij-idea/ .
Adding the following in Help | Edit Custom VM Options may help as well (IDE restart is needed):
Dear Serge,
I was finally able to restart my computer and now there is no problem with paths containing national characters!
I also tried before the options you had mentioned above (both: at the system level and in the IDE). Although they are definitely useful, alone they did not solve my problem, only the above-mentioned change in Control Panel did work.
Thank you once more!
Best regards!