Difference between revisions of "Netbeans"

From ArchWiki
Jump to navigation Jump to search
(→‎Netbeans doesn't start after its first start: Removed section about a missing dependency which was added in 2011.)
Line 70: Line 70:
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip
* Extract from zip to any location
* Extract from zip to any location
=== Netbeans doesn't start after its first start ===
If you receive a message like this when executing from terminal:
{{hc|# netbeans -h|
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory
You have two options:
* You can start Netbeans using the --nosplash option:
# netbeans --nosplash
* Or, install the missing library (libungif), then starting Netbeans as usual will work.
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]
{{Note|1=giflib doesn't provide libungif anymore, see [https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/xplanet&id=bd63a49bc5171c0f26785a8a37bcc638dcd2a473] and [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/giflib&id=8a9a3386617f6678c8dd1763b4ca3f39a839dc97].}}
=== Integrate Netbeans with kwallet ===
=== Integrate Netbeans with kwallet ===

Revision as of 07:47, 19 June 2014

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 which is available in the official repositories.

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, add switch --laf yourLookAndFeel to IDE command line by appending it to ‘netbeans_default_options’ section of /usr/share/netbeans/etc/netbeans.conf or editing .desktop file with which you launch Netbeans.

For GTK: --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

For Nimbus: --laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

Integrate with tomcat

It is possible to debug web applications running on tomcat within netbeans:

First install, tomcat.

You will need to create a configuration and deployment folder for your user, for example in /home/USER_NAME/.tomcat7

Copy /etc/tomcat7/ in /home/USER_NAME/.tomcat7/conf and check that you give read/write access to your user.

# sudo cp -r /etc/tomcat7/ /home/USER_NAME/.tomcat7/conf
# sudo chown -R USER_NAME:USER_NAME /home/USER_NAME/.tomcat7/conf

Make sure to configure /home/USER_NAME/.tomcat7/conf/tomcat-users.xml with a user having tomcat admin permissions so that netbeans can deploy applications.

Copy /var/lib/tomcat7/webapps in /home/USER_NAME/.tomcat7/webapps

Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.

In server location specify /usr/share/tomcat7

Check "Use Private Configuration Folder (Catalina Base)" and specify /home/USER_NAME/.tomcat7

Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml


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: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip

Solution is:

Integrate Netbeans with kwallet

Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[1]]

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

$ pacman -S qtchooser
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf

See forum discussion [[2]]