Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Make Netbeans Pretty

Related Posts

Find Netbeans.conf

The first thing we need to do is find the netbeans.conf file.

Netbeans 8.x And Below

  • Linux users:
    • /usr/local/netbeans-8.1/etc/netbeans.conf
    • $HOME/netbeans-8.x.x/etc/netbeans.conf.
  • Windows users
    • C:\Users\your_username\AppData\Roaming\NetBeans\8.2\config\Editors\Preferences.

Netbeans 10

With Netbeans 10 you extract a downloaded zip. The file will be within the extracted folder at etc/netbeans.conf.

Edit The Content

Once we have found and opened the configuration file, replace the line with netbeans_default_options with the following:

netbeans_default_options="
-J-client
-J-Xss2m
-J-Xms32m
-J-XX:PermSize=32m
-J-Dapple.laf.useScreenMenuBar=tr
-J-Dapple.awt.graphics.UseQuartz=true
-J-Dsun.java2d.noddraw=true
-J-Dsun.java2d.dpiaware=true
-J-Dsun.zip.disableMemoryMapping=true
-J-Dsun.awt.disableMixing=true
-J-Dawt.useSystemAAFontSettings=lcd
--laf Windows
-J-Dswing.aatext=true
-J-Dorg.netbeans.editor.aa.extra.hints=false
"

Increase Line Spacing

Locate the Preferences Configuration File

Use the following script to open the relevant configuration file in your editor. Version could also be 8.0.1 or 8.0.2 etc.

VERSION="8.1"
editor ~/.netbeans/$VERSION/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml

If it is not there, it will be wherever you set your user directories to be. For example, I have the following script to launch netbeans:

$HOME/data/apps/netbeans/12.6/bin/netbeans \
  --userdir $HOME/data/netbeans-user-directories/netbeans-12 \
  --laf Native \
  --jdkhome /usr/lib/jvm/java-11-openjdk-amd64 &

... thus it would be located within the $HOME/data/netbeans-user-directories/netbeans-12/ folder.

Specify the Line Height

Add the following entry, changing 1.4 to whatever line spacing you want.

<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">  
    <value><![CDATA[1.4]]></value>  
</entry>

References

Last updated: 9th December 2021
First published: 16th August 2018