If you want NetBeans to decode a file with UTF-8, you need to modify the configuration file as follows:
1. Find the ETC folder in your NetBeans installation directory, such as C:/Program Files/netbeans 7.3.1/etc/netbeans.conf
2. Open netbeans.conf with Notepad
3. Find the sentence of netbeans_default_options, there is no sign before #, line sixth in the document
4. Add a space at the back and add-j-dfile.encoding=utf-8
The modified Sixth Act:
Netbeans_default_options= "-j-client-j-xss2m-j-xms32m-j-xx:permsize=32m-j-xx:maxpermsize=200m- J-dapple.laf.usescreenmenubar=true-j-dapple.awt.graphics.usequartz=true-j-dsun.java2d.noddraw=true- J-dfile.encoding=utf-8″
So NetBeans's default encoding becomes UTF-8,
and a simple method.
1. Operating under Linux:
In the Modify default language is JA_JP. UTF-8, the operation is as follows:
Export LANG=JA_JP. UTF-8
NetBeans
2. How to modify Windows:
First step:
Open Tools--> options--> Advanced options
Then select Edit-->java Source code, modify the default encoding to UTF-8
Step Two:
Modify compilation options to support UTF-8 format
Open Project Properties--> compilation
Then modify the "Other compilation Options" value: "-encoding utf-8"