apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.55k stars 813 forks source link

Apache NetBeans does't launch on Windows if userdir contains non-English symbols #7109

Closed Sergey7701 closed 1 month ago

Sergey7701 commented 1 month ago

Apache NetBeans version

Apache NetBeans 21

What happened

After installing netbeans, I found that it does not start because it incorrectly identifies the user's folder. Replacing the launcher with the old one from version 20 solved the problem netbeans

Language / Project Type / NetBeans Component

No response

How to reproduce

rename the user's folder to a Cyrillic name

Did this work correctly in an earlier version?

Apache NetBeans 20

Operating System

Windows 11 23H2

JDK

jdk-17.0.1

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

neilcsmith-net commented 1 month ago

@eirikbakke @ebarboni I think this might be the first version of NetBeans that has actually shipped with the launcher changes introduced in https://github.com/apache/netbeans-native-launchers/pull/7 ??? Is this actually a regression caused by that somehow?

eirikbakke commented 1 month ago

@Sergey7701 Some follow-up questions: 1) What is the correct name of the user directory here? (In Cyrillic characters) 2) Could you see if the problem persists (with the latest version of the launcher that caused the problem) if you delete the NetBeans cache directory and try to restart NetBeans? The cache directory is a different directory that is likely at C:\Users\\AppData\Local\NetBeans\Cache\dev 3) Could you try running the netbeans64.exe launcher from the Windows command line, with the "--trace launcherlog.txt" option, and include both the output on the command line and the contents of the launcherlog.txt file? 4) In the Windows control panel, go to Time & language > Language & region -> Related settings -> Administrative language settings -> Change system locale. What is listed as the "Current system locale"? Is the "Beta: Use Unicode UTF-8 for worldwide language support" checkbox checked or not? (It shouldn't have to be.)

eirikbakke commented 1 month ago

Ah, I think you might need a newer Java version; at least Java 17.0.5, which contains a backport of the fix for JDK bug JDK-8272352.

NetBeans 21 does work for me without modification on Java 17.0.9 when run with a user with cyrillic characters in their username and home directory:

about-cyrillic
Sergey7701 commented 1 month ago

I reinstalled Netbeans with jdk 21 and the problem was resolved netbeans

eirikbakke commented 1 month ago

Great! I'm fairly certain that the issue is the aforementioned JDK bug, then, and so the recommendation to others who encounter this would be to upgrade to the latest Java version. (Or the latest patch release of Java 11 or Java 17 if they prefer those Java versions for any reason.)

Thanks for the report!