Raphel maî amech isabì almi

septiembre 24, 2008

NetBeans 6.1 in PC-BSD 7

Filed under: BSD, English — scarmiglione @ 3:01 am

I just installed NetBeans 6.1 in PC-BSD 7, and I must say that, even though it is multiplatform, it doesn’t make things easy, so I shall write here what I did.

As we know, we can install packages in PC-BSD 2 different ways, the fist: Install JDK from the GUI.
Search jdk in pbidir (http://www.pbidir.com/bt/search/?str=jdk&search=Search), download it and install as if it where a windows’ program.

The second, this also works with FreeBSD and DesktopBSD: Install JDK from the console.
This is useful in case that we need a more up-to-date package than the one in pbidir, download jdk from http://www.freebsdfoundation.org/downloads/java.shtml and install it like this
pkg_add -r javavmwrapper
pkg_add diablo-jdk-freebsd7.i386.
Accept the agreement and thats it.

Now download the platform independent version of NetBeans (.zip) from the official page and uncompress it in /opt
unzip netbeans-6.1-200805300101-ml-mobility.zip
mv netbeans netbeans61

Fore some reason that I don’t know, NetBeans ignores completely the environment variables _JAVA_OPTIONS, JDKHOME and JAVAHOME, so its necessary to specify the directory where JDK is installed, so we can execute it like this:
/opt/netbeans61/bin/netbeans –jdkhome /usr/local/diablo-jdk1.6.0

But, what do we see?

It starts with that horrible metallic skin. To fix it we need to specify that either GTK or motif must be used.
/opt/netbeans61/bin/netbeans –jdkhome /usr/local/diablo-jdk1.6.0 –laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

/opt/netbeans61/bin/netbeans –jdkhome /usr/local/diablo-jdk1.6.0 –laf com.sun.java.swing.plaf.motif.MotifLookAndFeel

And vow we only need to create a luncher and finish.

Blog de WordPress.com.