NetBeans 6 T-shirt Friday, Dec 28 2007 

NetBeans 6 T-shirt (front)NetBeans 6 T-shirt (back)

After waiting for 16 days finally the NetBeans T-shirt arrived.
They sent me this t-shirt because my participation in NetBeans Community Docs program although I only contribute 1 article (this) :p

Thanks to Sun and James Branam (NetBeans Community Docs Manager) for this cool t-shirt 😉
It’s a great pleasure to be part of the NetBeans community & I would love to contribute more.


NetBeans IDE 6 final released Tuesday, Dec 4 2007 

Finally Netbeans 6 final released 🙂
Download it at NetBeans 6 Download

Can’t wait to download and install it.
I hope they’ve already fixed bugs in previous release (RC2).

Netbeans 6 – Configure which editor (representative class) for new type extension Tuesday, Nov 20 2007 

A friend who is using Netbeans 6 ask how to configure Netbeans so it’ll open his start.tml as an html file not just as ordinary text file (So the editor will full with color I assume, not just black text :p)

I didn’t asked him why the hell he using .tml not just .html 🙂 but I tell him that he can configure Netbeans 6 with:

  1. Choose Tools – Options
  2. Click on ‘Advanced Options’ button (on bottom left)
  3. Open the tree : ‘IDE Configuration’ – ‘System’ – ‘Object Types’
  4. Find ‘HTML Objects’
  5. Add extension tml to ‘Extension and MIME Types’ property
  6. Close
  7. Now evertime you double click .tml file it’ll call HTML objects’ representative class 🙂

*Check this article on NetBeans Community Doc ^^

Change junit & run file (main class) working directory at Netbeans 5.5 Web Project Tuesday, Nov 13 2007 

If you create a new project with Netbeans and select to create “web application”.
You’ll notice that at ‘project properties’ – ‘Run’ there’s no ‘Working Directory’ configuration, unlike General Java Project.

But what if you want to create some console application (with main method) in that project with Netbeans. You run it with Netbeans shortcut shift+F6 (run file) and realize that Netbeans set the working directory to project base path.
Then you also try to run your unit testing (junit) and realize the same thing.
You put some configuration file to specific directory in your source folder, and of course your console app & unit testing can’t find it.

I’m not very familiar with Netbeans, but after some googling I found out that Netbeans using ant : file build-impl.xml in nbproject folder. If we change the project properties configuration Netbeans will re-generate the build-impl.xml.
Netbeans also provider file build.xml in project base folder for customizing project build & run.

So i add at build.xml (copy from build-impl.xml and modify the tag ‘dir’ value)

 <target name=”-init-macrodef-junit”>
<macrodef name=”junit” uri=”″&gt;
<attribute name=”includes” default=”**/*”/>
<junit showoutput=”true” fork=”true” dir=”${basedir}/build/web/WEB-INF/classes” failureproperty=”tests.failed” errorproperty=”tests.failed”>
<batchtest todir=”${build.test.results.dir}”>
<fileset dir=”${test.src.dir}” includes=”@{includes}”/>
<path path=”${run.test.classpath}”/>
<propertyref prefix=”test-sys-prop.”/>
<mapper type=”glob” from=”test-sys-prop.*” to=”*”/>
<formatter type=”brief” usefile=”false”/>
<formatter type=”xml”/>

<target name=”-init-macrodef-java”>
<macrodef name=”java” uri=”″&gt;
<attribute name=”classname” default=”${main.class}”/>
<element name=”customize” optional=”true”/>
<java fork=”true” classname=”@{classname}” dir=”${basedir}/build/web/WEB-INF/classes”>
<jvmarg line=”${runmain.jvmargs}”/>
<path path=”${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}”/>
<propertyref prefix=”run-sys-prop.”/>
<mapper type=”glob” from=”run-sys-prop.*” to=”*”/>

So every unit test & run-file at Netbeans will have working directory to {project basedir}/build/web/WEB-INF/classes

Using svn+ssh with Netbeans 5.5 + Windows Tuesday, Nov 6 2007 

After you install Netbeans 5.5 you need to download/install subversion module.
At Netbeans menu select ‘Tools’ – ‘Update Center’ to add subversion module.
If the installation finished, you will see menu Subversion on Netbeans menu.

You’ll also need to install SVN : download page here

I’m using PuTTY’s plink.exe for ssh. You can get PuTTY package here.
Extract PuTTYto a directory and add path to that directory.
How to setting enviroment variables in Windows:

  • Open System Properties (by right click ‘My Computer’ – ‘Properties or by press button ‘windows’ + ‘break’)
  • Select tab Advanced & click button ‘Environment Variables’
  • You can edit System Variable : ‘path’
  • Add path to your PuTTY directory. (don’t delete other path, just add with ‘;’ as separator)
  • OK
  • You can check whether you have correctly add PuTTY’s path by running console (cmd) and run plink.exe without fullpath.

Then open subversion configuration file at : %APPDATA%\Subversion\config
Assuming you using default folder it will be : “c:\Documents and Settings\username\Application Data\Subversion\config”
Open file config using notepad or other text-editor.
Edit the [tunnels] section and add :

ssh = $SVN_SSH plink.exe -l <username> -pw <password>

Of course change the <username> and <password> with yours. lol.

Then save it & restart your Netbeans.
After that you should able to check out/import project via svn+ssh.

  • Select menu ‘Subversion’ – ‘Checkout…’
  • URL example : svn+ssh://
  • Leave username & password empty
  • Click next & follow the instructions.

If there’s no errors then Congratulations 🙂