From ArchWiki
Jump to: navigation, search

Netbeans is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.

From Wikipedia article:

"The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages."


Install the netbeans package.

Tips and tricks

Note: The global netbeans.conf /usr/share/netbeans/etc/netbeans.conf will be overwritten during updates. To keep changes add them to your local netbeans.conf ~/.netbeans/<ver>/etc/netbeans.conf (you will need to create the etc dir and the .conf file).
  • Settings in local version of netbeans.conf override the same settings in the global copy of the file.
  • Command-line options override settings in either of the configuration files.

Font antialiasing in Netbeans

Netbeans Specifically

Add -J-Dswing.aatext=TRUE -J-Dawt.useSystemAAFontSettings=on to the 'netbeans_default_options' line of your netbeans.conf file.

Java Generally

See Java#Better font rendering.

Look and feel

To change Netbeans look and feel, go to Tools>Options>Appearance>Look and Feel

To add dark look and feels install the Dark Look And Feel Themes plugin via Tools>Plugin>Available Plugins

Maven problems with small tmpfs

If your system has a small tmpfs partition you will have problems unpacking the maven index (will continue downloading again after failing to unpack). To remedy this add netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true" to the end of your netbeans.conf file.

Integrate with the Apache Tomcat Servlet Container

It is possible to debug web applications running on Tomcat from within Netbeans, using stock Arch packages for both Netbeans and Tomcat. While this section is written for tomcat7, this applies to all versions of Tomcat currently in the repositories. (To check which are available, run pacman -Ss tomcat)

  • First install your desired version of Tomcat, such as pacman -S tomcat7 (see also Tomcat).
  • While you can modify the configuration files in /etc/tomcat7 to work with Netbeans debugging, it is recommended you create local copies and use those instead. That way, you still can run Tomcat as an ongoing system service, while debuggging with a different instance:
    • Pick a location for the local configuration files, such as ~/.tomcat7 and create that directory.
    • Copy /etc/tomcat7/ to ~/.tomcat7/conf, e.g. sudo cp -r /etc/tomcat7 ~/.tomcat7/conf and sudo chown -R $(id -un):$(id -gn) ~/.tomcat7
    • Clean up the Tomcat users and permission file, so Netbeans can insert what it needs. Edit ~/.tomcat7/conf/tomcat-users.xml to like this without any user and role information in it:
<?xml version='1.0' encoding='utf-8'?>
 <tomcat-users xmlns=""
               xsi:schemaLocation=" tomcat-users.xsd"
  • Make the "manager" app accessible from your local configuration: mkdir ~/.tomcat7/webapps and ln -s /var/lib/tomcat7/webapps/manager ~/.tomcat7/webapps/manager
  • Provide a temp directory: mkdir ~/.tomcat7/temp
  • If needed, change the port at which Tomcat runs by editing ~/.tomcat7/conf/server.xml
  • Have Tomcat write its logs somewhere else than /var/log/tomcat7
  • Unfortunately, Netbeans refuses to continue unless you make file /etc/tomcat7/server.xml readable to it. So sudo chmod 644 /etc/tomcat7/server.xml temporarily, and change it back later.

Then, in Netbeans:

  • Go to "Tools>Servers>Add Server" and select Apache Tomcat. Click "Next".
  • In "server location", specify /usr/share/tomcat7
  • Check "Use Private Configuration Folder (Catalina Base)" and specify the full path to directory ~/.tomcat7. This must be the full path, as Netbeans does not recognize the meaning of ~.
  • Finally, pick a username and password. Check "Create user if it does not exist". This will configure Netbeans, but also add the user information to the tomcat-users.xml file.


Note that this local instance of Tomcat will write its logs to ~/.tomcat7/logs, not /var/log/tomcat7.


OpenJDK vs Sun's JDK

Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:

  • Starting - In some cases, netbeans will not start.
  • Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).
  • JavaFX module does not work (see FS#29843).

Glassfish server - Can`t download Glassfish server I/O Exception

If you are trying add new Glassfish server, you can`t download the server. Netbeans returns

I/O Exception:

Solution is:

Integrate Netbeans with kwallet

Netbeans may need to store some passwords. It can do that in kwallet. See this article in the Netbeans wiki.

However, you need to install and configure qtchooserAUR so that netbeans find the qdbus command:

$ ln -s /etc/xdg/qtchooser/4.conf ~/.config/qtchooser/default.conf

See forum discussion [1]