This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am running NB on win XP in Japanese locale. If I try to input japanese characters into editor and run a file, building file fails. The project encoding is set to UTF-8. got this error: あAAA始run:んZZZ終 Exception in thread "main" java.lang.RuntimeException: Uncompilable source code at javaapplication9.Main.main(Main.java:19) Java Result: 1 あAAA始BUILD SUCCESSFUL (total time: 5 seconds)んZZZ終 If I switch project encoding to windows31j and do the same process, file is successfully compiled. Using mbytes in UTF-8 worked in versions NB6.5.1 and M3
Created attachment 80945 [details] messages log
What is code at line Mina:19 ?
line 19: System.out.println(".んZZZ終");
More description about behaviour: I created a new java project and put System.out.println(".んZZZ終"); to main.java class. The build fails. After that I restarted NB and tried to run file again. The build is successful and the text is printed to output window. If I create a new class with mbytes and then try to print some mbytes, error appears. After NB restart it is still there. あAAA始run:んZZZ終 java.lang.NoClassDefFoundError: javaapplication9/スイテテイス Caused by: java.lang.ClassNotFoundException: javaapplication9.スイテテイス at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) Could not find the main class: javaapplication9.スイテテイス. Program will exit. Exception in thread "main" Java Result: 1 あAAA始BUILD SUCCESSFUL (total time: 1 second)んZZZ終
Does your project use Compile On Save? This could be related to issue #121727.
I tried the procedure described here on a Windows XP French edition (the standard CP1252 encoding). Yes, the fault is (at least) to the Compile On Save. When I remove it, mo more encoding problems occurs with Java file contents nor Java file names while compiling. However, with exotic Java file names, the IDE still report errors (I guess it uses the same mechanism than Compile On Save). Futhermore, it breaks the renaming of class names in Refactoring. And I don't think it is related to issue #121727. There is no encoding changes, and it happens even if one trashed the /var/cache Now, I am sure that my issue 164427 is a duplicate of this.
VStejskal: I am using compile on save.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/5f1b743c8f7f
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5f1b743c8f7f User: Dusan Balek <dbalek@netbeans.org> Log: Issue #163697: cannot use utf-8 encoding in none english locale - fixed.
*** Issue 164427 has been marked as a duplicate of this issue. ***