Wednesday Feb 06, 2008

NetBeans tooling for Eclipse developers?

Who would have thought that NetBeans will be building tooling for the Eclipse developer community? Runtime tooling that is. I'll explain shortly. The two communities have been engaged in a healthy competition for the hearts and minds of developers at large, however the focus has been the "design time". One could consider one of the new NetBeans projects as a play for a much broader audience, including developers that are still using Vi/Emacs for their development and are not currently using an IDE.

[Read More]

Monday Feb 04, 2008

A step in the right direction

In a previous blog I mentioned that I installed VMWare Fusion 1.1 and Linux (Ubuntu 7.10 - Gutsy). Solaris Express Developer Edition (SXDE) was the next OS that I looking to install (as I was looking to compare the respective SAMP and LAMP stacks). If all this worked out OK, I would get rid of my Parallels installation and stick with VMWare. This is not the first time I've experimented with SXDE, and was curious if the Solaris folks have made more progress.

The answer is yes, however there is more to be done, especially since Ubuntu sets the bar so high. Here are the details

[Read More]

Monday Jan 28, 2008

NetBeans and MySQL

Sun's recent announcement to acquire MySQL, reminded me that I actually have a copy of MySQL installed on my Mac. I've done that a long time ago, when I was experimenting with Wordpress (the blogging software) and to easily deal with the compatibility issues of MySQL & PHP, I installed the MAMP software.

I knew that NetBeans bundles the Connector/J JDBC driver, so I wanted to find out how easy would it be to point NetBeans to the MySQL database used when I originally setup Wordpress.

In a nutshell, it was an easy process. I used the "New Connection" wizard on the "Services" (Database node) tab in the IDE and just used the custom port (8889) used by Wordpress, rather than the default one used by MySQL (3306). As it is always the case, a screen shot tells the story better.

New to Ruby

I recently experimented with Ruby on Rails, using NetBeans 6. My previous attempt with RoR was about 9 month ago and I remember having to do a lot of curls and makes to get everything configured. Getting started with NetBeans has been very easy, since there is a distribution (19 MB download) for Ruby developers and the IDE also included the runtime.

Given that I know Tor, the main architect and implementor of Ruby/JRuby tooling in NetBeans and I recently googled his name and Ruby. I found this excellent video that got me up to speed in no time. It turns out that the video has been extremely successful - as of 1/28/08 it had more that 100K downloads. Very impressive.


Thursday Jan 10, 2008

Community developer support

As a developer using NetBeans you can get a variety of help in using the IDE or learning how to extend and build on the platform. Historically most of the users have been using the mailing list as a resource to get their questions answered. Developers involved in key projects that need enterprise level support and services  should be able to purchase professional support from Sun. Most recently, the support team has been publishing a blog where the NetBeans community members could go for tips on how to effectively use NetBeans and become more productive.

Listening to the customer


The NetBeans team just released another patch for NetBeans 6, to the community. The latest patch includes an update of the JavaServer Faces components library (codenamed - Woodstock). The update improves the runtime performance of the library.

If you want to nominate more bugs to be included in future patches, just take a look at the wiki page.

Thursday Jan 03, 2008

NetBeans moving to Mercurial

NetBeans sources will be moving shortly to a different version control system - Mercurial. The details of the migration are detailed here. Tonda is in charge, so send him feedback. If you are not familiar with distributed version control systems, take a look at this article. Here is how I configured my own instance of NetBeans 6 to use Mercurial and point to the new repository.

Nota bene: I am running on a Mac - Leopard + Java 1.5.0_13.

  • Get Mercurial (it will require Python)
  • Install the Mercurial plugin from the NetBeans update center (Tools | Plugins) and get familiar with the documentation.
  • Point NetBeans (assuming that you are using NetBeans to build and develop) to the repository (Versioning | Mercurial | Clone Other ...):
  • If you are looking for instructions on how to clone a repository from the command line, I found this document to be useful
If you run into trouble, write to the team ( to get support.

Wednesday Jan 02, 2008

Popularity of NetBeans is reflected in the demand for jobs with relevant skills

One way to gage success of product or technology is to look at the job trends that call for relevant skills. Honza recently pointed me to this site, that helps professionals search for jobs. I was pleasantly surprised to see the recent surge of jobs that call for NetBeans. I suspect that the industry has realized by now that NetBeans the best IDE for Ruby, Web Services and Swing application development.


Monday Dec 03, 2007

History & Frankfurt

Frankfurt, the fifth largest German city, started as a Roman settlement, about 2000 years ago. Lots has happened since. Here are some historical (and other :-)) highlights:

  • During the Napoleonic Wars Frankfurt was occupied or cannonaded several times by French troops. It nevertheless still remained a free city until the total collapse of the Holy Roman Empire in 1805/6

It used to be a Java IDE

NetBeans started as a Java IDE, one of the first open source projects at Sun. It was long time ago ('99). Since then, it has evolved rapidly, especially in the last couple of years and became more than an IDE. It is also a platform. In addition , NetBeans has become a delivery vehicle for cool technologies from Sun and the Open Source (e.g. JRuby, GlassFish, Tomcat). Some people may argue that, lately, NetBeans has become choice IDE for Ruby developers. How about the support for C/C++ and UML? It is all there.


Nota Bene:



Sunday Nov 18, 2007

Java RESTful web services made easy with NetBeans 6

Web Services have become synonymous with interoperability (A "feature" demanded by the customers that need to make both .NET and Java, IT investments). There are couple of approaches to exposing functionality as a web service. The more established one is using SOAP & WSDL and the "newer" Representational State Transfer (REST) style web services. Of course tooling has not been far behind the trends and all the respectable vendors have some support for web services. JSR 311 has been coming along in describing an API developers can use to build RESTful web services.

In NetBeans 6, you'll find very useful functionality that enables you to build and test a RESTful web service. The best way is to start with with short tutorial. To learn more about the JAX-RS API, take a look at this blog.

By the way, since RESTful Web Services support in Java is still an evolving technology, the tooling resides on the NetBeans update center. Just use the Tools | Plugins menu and look for "RESTfull Web Services" in the Web & Java EE category. Once you install the plugin, you'll also get a few samples that will help you get started.

Get busy!

Wednesday Nov 14, 2007

A thread dump worth a 1000 bug reports

The old proverb: "a picture is worth a thousand words", has an interesting mapping in the world of programming. On the Java platform one has a few facilities that enable a developer to get a stack trace that can point to the cause of a UI freeze, slow down in an application performance, etc. A thread dump can save a developer a lot of time in troubleshooting tough problems. In the old days one could start the application and a terminal and call CTRL + Break on the Windows platform or kill -QUIT pid on the Unix platform. Of course if one has access to the sources you can force the application to show you the call stack by doing something "un-natural" such as Thread.getCurrentThread().dumpStack(). Keep in mind that this will crash you application, so don't do it on production code. This wiki entry has more details on how to, gently :-), get a Thread dump.

In a recent conversation with Tor I learned some more details. For instance, on the Windows platform, using Java 6 one could employ the jps -ln command to get the process id of Java application and then use the jstack command on that process id (jstack pid) to get a thread dump. Nice documentation can be found here.

If you really in the mood to experiment, take a look at the Visual VM project that was just launched on You'll find a cool tool, based on the NetBeans platform, that helps monitor and profile Java applications. It only runs on top on Java 6, however it can work on applications based on JDK 1.4.2 or later.

Thursday Nov 01, 2007

PHP coming soon on a NetBeans installation near you

Alexei and the team have been working on a PHP plugin for NetBeans 6. I am hoping they'll be able to release it on the NetBeans 6 update center in early December. The bits will be young, beta quality at best, however I am experimenting with PHP support in NetBeans and I like what I see so far.

The first thing one may do is make sure to get a runtime stack that supports the deployment of PHP applications. Given that many of these apps will have a database backend, this calls for something like MySQL. You'll also need a matching web server, and apache comes to mind :-). Here are few easy steps to get started:


  1. SSH Server (for remote access): sudo apt-get install ssh
  2. Database Server: sudo apt-get install mysql-server
  3. Apache HTTP Server: sudo apt-get install apache2
  4. PHP for Apache HTTP Server: sudo apt-get install php5
  5. MYSQL for Apache HTTP Server: sudo apt-get install libapache2-mod-auth-mysql
    sudo apt-get install php5-mysql

Once you install the PHP plugin in NetBeans, use the  "Services" tab to configure the document root for Apache web server installation. On my Ubuntu installation the document root is /var/www/apache2-default. You will likely have to change the permission for the document root, since NetBeans is usually install in user mode and apache required sudo.

To test everything, just create a new PHP Project in the IDE and add the following line of code: phpInfo(); in the default file. Next deploy you page and in your browser look for something like: http://localhost/apache2-default/index.php 

Wednesday Oct 31, 2007

Centering components in a (visual) web form

One of the typical requirements for a web application developer is to build a secure, identity enabled web application. NetBeans supports this usecase either by employing the bundled JavaServer Faces components, or a combination of JSP & HTML. On the backend the user can either use container based authentication, a database or some custom authentication mechanism.

Let's explore what one would have to do to build the a login page in NetBeans. In order to speed up the development, one can choose the visual application features (File | New Project | web | ... "Next" in the first page of the wizard | check the "Visual JSF" option and voila you have a page and a palette full of useful components that you can just drag and drop them in the form (page).

Further my requirement will be to center the group of components in the page. This turned out to be a little tricky so here are some steps that one can follow to work around this NetBeans shortcoming:

1. Select the page in the designer and in the property pane switch to Flow Layout
2. Remove style attribute.
3. In the JSP view of the page, use  <center> and <br> tags to adjust layout.

This works at both design time and run time. Here is an example of the a form that uses a couple of labels, textfields and button to submit the form.

<webuijsf:form binding="#{Page1.form1}" id="form1">
                           <webuijsf:label binding="#{Page1.label1}" id="label1"  text="Label"/>
                           <webuijsf:textField binding="#{Page1.textField1}" id="textField1" />
                           <webuijsf:label binding="#{Page1.label2}" id="label2"  text="Label"/>
                           <webuijsf:textField binding="#{Page1.textField2}" id="textField2" />
                           <webuijsf:button binding="#{Page1.button1}" id="button1"  text="Button"/>

Many thanks to Jayashri for helping me work out a solution.

Perhaps in a the next installment I'll talk more about authentication and how to deploy on an https port using the Glassfish application server.

Monday Oct 22, 2007

NetBeans ships version 6 beta 2

NetBeans ships beta 2 of the upcoming 6.0 release, today (10/22/07). New NetBeans users may want to start on the docs page, while current users could just download the bits to get the latest bug fixes. If you are new to Java start here, you'll see a variety of online courses - all using NetBeans. Also, I highly recommend subscribing to the mailing lists (NetBeans has developers around the world: St Petersburg - Russia, Prague - Czech Republic, and the US, you'll likely be able to get help around the clock).

Thursday Oct 18, 2007

Woodstock live!

You may be thinking of the 1969 music festival, but I'd like to draw your attention to some cool technology that is currently bundled with NetBeans 6 and shares the same famous name: Woodstock, a set of JavaServer Faces, Ajax enabled components. The design time behavior of the components inside of the IDE is very rich. You'll find them in a palette, have the ability to drag and drop them on a page, easily bind them to heterogeneous data sources: databases, Web Services, EJB's, collections, etc. Building a web application with a consistent look and feel is an exercise that only takes a few minutes.

One can also experience the components (the runtime behavior) outside the NetBeans development environment, by going the project page. This is very cool, since you don't have to install anything to view the components or code review the implementation of the examples listed on the website.

Wednesday Aug 22, 2007

One more time ... with feeling (Solaris on my Mac)

The reader may be familiar with my previous efforts to install Solaris on my MacBook Pro. The results have been mixed: I've succeded, however the experience was somewhat painful. I had decided to give the eng team some feedback, time and try it again. Thanks to Ludo for inspiring me. A few month later I gave it another shot: installing the latest iteration of the Solaris Express Developer Edition (SXDE) on my MacBook Pro. Nota bene - I already have Vista and Ubuntu Feisty running under Parallels on my precious MacBook Pro.

This time I've tried using Nevada build 70a and the results have been impressive. Eureka! I have a fully functional Solaris (Nevada)  install, running virtually via Parallels. Hey, is not Ubuntu easy yet, but a huge improvement. Thanks Don and Jeff for not giving up.

Here is some tips if you want to give Solaris a chance (I believe you should):

  • Download this version of SXDE. Folks keep in mind that this is work in progress and some of the builds have serious bugs
  • Prepare yourself to spend a while (120 minutes) installing, so go through installation while plugged in to a power source
  • Accept defaults
  • Solaris seems to like for you to be networked while rebooting after the install
  • Extra credit - change the resolution to the native one on a 15" MacBook Pro (1440x900)
    • login and become root
    • cd /etc/X11
    • cp .xargs.conf xargs.conf
    • edit xargs.conf as follows (at the end)
      • Section "Monitor"
                Identifier   "Monitor0"
                VendorName   "Monitor Vendor"
                ModelName    "Monitor Model"
                HorizSync    31.5 - 100.0
                VertRefresh  59.0 - 75.0
                Option      "dpms"
                Modeline "1440x900" 108.84 1440 1472 1800 1912 900 918 927 946

        Section "Device"
                ### Available Driver options are:-
                ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
                ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
                ### [arg]: arg optional
                #Option     "ShadowFB"                  # [<bool>]
                #Option     "DefaultRefresh"            # [<bool>]
                #Option     "ModeSetClearScreen"        # [<bool>]
                Identifier  "Card0"
                Driver      "vesa"
                BusID       "ISA"

        Section "Screen"
                Identifier "Screen0"
                Device     "Card0"
                Monitor    "Monitor0"
                DefaultDepth     24
                SubSection "Display"
                        Viewport   0 0
                        Depth     24
                        Modes     "1440x900"

What you get (in addition to a solid, feature reach OS): compiler, tools (for both native and Java dev), middleware components - application server, web server; productivity tools - StarOffice/Firefox/Thunderbird, etc. The complete list of details can be found here.

Saturday Aug 11, 2007

"Make NetBeans yours"

Are you a NetBeans user? You may have not noticed that the main page has been translated in many languages. The other day I clicked the "Choose page language" drop down at the top of the page and I was impressed: Arabic, Czech (a given, since NetBeans originates from Prague), German, Greek, Spanish, Persian, Romanian (to my pleasant surprise) are just a few of the languages in the list. The really cool part is that most of the translation have been done by folks in the developers community.

There are other goodies if English is not your language of choice:

  • Localized mailing list
  • The NetBeans IDE is localized in Simplified Chinese, Japanese, and Brazilian Portugese
  • If you are into blogs, you may want to take a look at, an aggregation of NetBeans related musings from all over the Blogosphere

If you are looking to participate to the growing community, take a look at this page. If you have any questions just email Janice or take a look at her blog.



Friday Jul 27, 2007

Get Started with JavaFX Script

JavaFX Script made it debut in May '07 during the Java One conference. The excitement of the developer community is obvious and the project became the most popular project on

Here are a few easy steps that could help any developer get started with JavaFX Script.

Of course folks can use an IDE to learn the language, so in this case I would recommend this tutorial. It will call for the use of NetBeans (which is now available in a small - "basic profile" ~ 23 MB) and one will have to use the update center and download the FX plugin

Thursday May 03, 2007

What's on tap @ NetBeans Day

The NetBeans platform and IDE has evolved tremendously in the last couple of years. Version 6 is around the corner and the Sun will be releasing a preview at NetBeans Day / Java One. So what's on tap? Support for native and dynamic languages (Ruby, JavaScript), Java Studio Creator's ease of use available for desktop applications, integrated profiler, rapid visual web application development, UML, REST W/S, lots of productivity features, etc. The best way to get more info is by attending NetBeans Day (details below).

May 7th, Moscone 

NetBeans Day


  • NetBeans Day Opening Session: Jonathan Schwartz and Rich Green
  • Lunch with the Java Posse
  • NetBeans 6.0 IDE
  • Partner Showcase
    • CollabNet, YASU Technologies
  • Swing GUI Building With Matisse: Chapter II
  • NetBeansMobility
  • JRuby: Understanding the Fuss
  • Partner Showcase
    • Intland, USDA, Xoetrope
  • Closing Session: James Gosling

The first 400 attendees will receive a free copy of Rich Client Programming: Plugging into the NetBeans Platform. We will also be giving out 1 GB USB flash drives, loaded with the latest NetBeans 6.0 Milestone. Throughout the day, we will be giving out special edition NB 6.0 T-shirts and NetBeans cubes. Pay attention, you may have to earn your T-shirt by asking or answering a question.

Thursday Apr 19, 2007

The answer is NetBeans, what is your question

Here is a preview (take this with a grain of salt) of the NetBeans 6 preview at Java One

Most of the functionality that you used to see in Java Studio Creator, Java Studio Enterprise has been open sourced and it is now available in NetBeans. So far there are three profiles (in absence of a better description) available: 

  • Basic ~ Java SE
  • Standard ~ Basic + Java EE (this calls for Glassfish since you'll need a container for deployment)/ME
  • Full ~ Standard + SOA, UML, Ruby
If you want to see all the new & cool features of the IDE, just register for NetBeans Day @ Java One. You'll have a chance to meet many of the key developers and most importantly, you have the ability to influence the future of the product.

On the offensive

I try to stay away from transforming my blog into a marketing tool, however I'll make an exception this time. The NetBeans folks just released an online sample application catalog which illustrates some of the cool apps that NetBeans bundles or that you can download from the update center. I strongly believe that developers learn by example and providing folks with samples enables folks to get up to speed with new technologies, learn new programming techniques, etc.

In a nutshell, one can jump start their next development project with one of the Top 5 NetBeans sample applications spanning the latest enterprise, mobile, and scripting technologies. Get inspired and get started today. 

NetBeans is likely the only IDE you'll ever need!

Sunday Apr 15, 2007

Showing folks how to solve real problems

The NetBeans folks are in the process of releasing a few, very cool sample applications. Since developer tools are just means to help engineers solve problems and be more productive, the idea was to put together a set of application that demonstrate the ease of use of certain technologies and solve common problems. The one that really caught my attention is a an app called flickr on rails, and it is written using NetBeans 6 (milestone 8 or later). You read this right. Ruby support in NetBeans. Moreover with version 6 the NetBeans platform has, now, intrinsic support for dynamic languages. If you want more details read about project Schliemann.

If you are a cynic like myself :-) you don't believe unless you see, so here is place where you can see a short movie that describes the building of a flicker like application in NetBeans using Ruby on Rails. If you just want to see the NetBeans @ work here is a screen shot that "speaks" for itself.


Keep in mind that NetBeans 6 is still young and even by Java One in mid May, the eng team will still show a preview of the product. If you are interested in improving the Ruby support in NetBeans, just participate. After all NetBeans is one of the oldest open source projects and Tor could use plenty of help.

London calls for an upgrade

I've recentely attendended Sun Tech Days and NetBeans Day in London. The event was hosted in a splendid location, across the street from Westminster Abbey. James was also there and he knows London inside out, so we got a little bit of history and the inside scoop on restaurants from the guy that knows too much in pretty much any subject you converse about.

So let me get to the point about London and the call to upgrade ... my wardrobe. After the event was over, on Thu afternoon, I thought of taking the opportunity to have tea, in a traditional way, wherelse but at the Ritz. Silvia,  I and a pristine Credit Card, walked full of confidence  ready to take on the tea challenge. And a challenge it was. We walk towards the entrance and the "general" (door man) seemed to ignore us (we later learned why). Hmm, not a good sign, however he did not block us from entering. We made our way into the lobby (which at the Ritz is likely called something else) and we were intercepted by one of the staff. He was impacably dressed and extremely polite. I can't remember his choice of words, however in my ESL translation it sounded something like this: "You are dressed like a savage and look like a gorilla ... dress code calls for jacket and tie, moreover jeans are prohibited and you are lucky I am not flogging you" :-) In all fairness he recommended another tea place across the street, where I barely passed given that I was wearing a sports jacket.

I evaluated the event with mixed emotions. The fact that fashion challenged should not have been such an insurmountable handicap. I should have told the guy about WWII and the fact that he would have spoken German without the help of one million American GIs. And 1917, when they were stuck in a mud trench with no light at the end of the tunnel. Hey, but I am not that kind of guy. We laughed it off and went on to have a great evening.  So now I face a choice, either pursue a more conservative style ala Bill Franklin (who used to live in London), next time time I am London or exclude establishments stuck in the past from my itinerary. If I am really lucky, perhaps I can buy the Ritz one day and change the rules. The only problem is that I may be in diapers :-) by that time and I may be lowering the standards too much for the rest of the patrons.




« July 2016