Netbeans IDE tutorial

A quick step-by-step guide how to configure NetBeans default encoding UTF-8. In result NetBeans will create all new files in UTF-8 encoding.

NetBeans default encoding UTF-8 step-by-step guide

  1. Go to etc folder in NetBeans installation directory
  2. Edit netbeans.conf file
  3. Find netbeans_default_options line
  4. Add -J-Dfile.encoding=UTF-8 inside quotation marks inside that line (example: netbeans_default_options="-J-Dfile.encoding=UTF-8")
  5. Restart NetBeans

You set NetBeans default encoding UTF-8.

Your netbeans_default_options may contain additional parameters inside the quotation marks. In such case, add -J-Dfile.encoding=UTF-8 at the end of the string. Separate it with space from other parameters.


netbeans_default_options="-J-client -J-Xss128m -J-Xms256m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dfile.encoding=UTF-8"