Showing posts with label netbeans. Show all posts
Showing posts with label netbeans. Show all posts

Sunday, January 18, 2009

Netbeans and Nimbus Theme on Windows Vista



Actually I should name this topic "Netbeans and Nimbus Look & Feel (L&F)" but that would eliminate many search terms that use word "theme" instead :)

To set your Netbeans, in my case it's 6.5, to use the new Nimbus theme, just look under your Netbeans installation folder/etc/netbeans.conf file. It is usually located at C:\Program Files\NetBeans 6.5\etc\netbeans.conf. Then just append --laf Nimbus to netbeans_default_options.

So it looks like this:

...
# command line switches:

netbeans_default_options="-J-Dorg.glassfish.v3.installRoot=\"C:\Program Files\glassfish-v3-prelude\" -J-Dcom.sun.aas.installRoot=\"C:\Program Files\glassfish-v2ur2\" -J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true --laf Nimbus"
# Note that a default -Xmx is selected for you automatically.
...
Then save the file and restart your Netbeans, and proud of your new Netbeans Nimbus theme!

Note:
  • To edit the netbeans.conf file under Windows, you may need editor that capable of editing unix text file. I recommend using Netbeans itself to edit this file instead of Notepad.
  • If you want to change the theme back to default then you can just remove the added options from netbeans.conf file. I recommend you to bookmark this page so you will not forget where to set this option :P
Hope this helps!

Friday, December 14, 2007

Uninstalled Netbeans 5.5.1 from my Ubuntu

It is not because I do not like Netbeans or something like that. But it is because I got the brand new Netbeans 6.0 IDE installed on my computer. So I think it is OK to uninstall the old version now :)

You can get Netbeans 6.0 IDE here!


Different versions of Netbeans IDE actually can coexist without any conflict. Unfortunately, my HDD space of Ubuntu partition is very limited (at 6 GB). So I need to keep only the programs I actually use.

Uninstalling program from Ubuntu Linux is done differently from Windows. I installed the Netbeans IDE using the Package Manager. But I cannot find a way to uninstall the program using it. So I checked Application->Add/Remove... but still got no luck. So I finally browsed to Netbeans 5.5.1 folder located at /home/m3rlinez/netbeans-5.5.1/_uninst/ and found an uninstall script (uninstaller.sh). I double clicked on it and selected Run in Terminal. Then, the nice GUI popped up and I uninstalled Netbeans.



After my experience from using the latest release of Ubuntu (7.10). I think Ubuntu is now ready for many computer geeks and Java developers. But it may not be ready my mom :( The team has to get more works done.

Thursday, January 18, 2007

UTF-8 in Netbeans 5.5

I have Netbeans 5.5 with JDK 6.0 running on my Windows Vista RC1 for a month now. Problem arises when I need to use Thai language in my Java Applet project.


From the figure in the left, I try to draw a string, "สวัสดีครับ", but it was displayed as "??????????". By the way, If you enter your Thai texts via Netbeans' properties editor they will be displayed properly like the caption of JButton in my applet. (If you examined the designer generated sources, you would see escaped string instead of pure Thai text)

To fix the problem, right click on your java source file, click on properties, change the encoding to "utf-8".


After changed the file encoding, you have to close your file and reopen it. You can now edit your file and it will be saved as UTF-8.



But if you compile your file at this point, you will get something like "unmappable character for encoding XXX" error. There is one more little thing to change, Go to project properties window by right click on the project name in the project navigator and click on properties, Go to build->compile and add "-encoding utf-8" at the Additional Compiler Options.


This is my result,


This solution may apply to other foreign languages too.

Thursday, December 14, 2006

Windows username problem

Today, I have to install Netbeans 5.5, a very popular IDE for Java, on my friend's notebook. At first, the installer said that there is no JDK on this computer. So we find another Netbeans installer pack which included JDK 6. But the situation is almost the same. The installer asked to locate the "java.exe" file but after I select the correct file it said file is corrupted.

We try restarting Windows, reinstalling the JDK, but none of them worked. After a while, I noticed that my friend's Windows user name is a little weird (It contain "@" and "!"). So I try create a new Windows user account. And try install Netbeans again from there. Bang! It worked!

I realized that this is not the first time I experienced this problem. So, do not name your next Windows account with those weird characters :)