Monday Feb 15, 2010

Oracle OpenWorld 2009 GC Presentation

A little late in getting these posted, ~ 3 months, but here are the slides John Pampuch & I presented at Oracle OpenWorld 2009.

A special thanks & recognition to Tony Printezis.  Tony was the original creator of the slides.  My contribution was very small in comparison to Tony's.

Monday Nov 17, 2008

What's in a version? java -version that is ...

I have been doing some extensive performance testing with recent JDK's and HotSpot versions, (more on the details of this performance activity in a latter blog entry).  Notice I make a distinction between JDK version and HotSpot version?  You may have observed when you do a "java -version" on a recent JDK / JRE you see a "Java" version such as "build 1.6.0_10-b33" and a "Java HotSpot" version such as "build 11.0-b15".  The distinction here is really the integration of a Java SE class library build with an underlying HotSpot JVM build which makes a JDK/JRE distribution and the underlying HotSpot JVM version.  In other words, in the following output from "java -version", a JDK class library build and HotSpot JVM build is integrated together into a JDK version called 1.6.0_10, which happens to be build 33 of that integration.  The underlying HotSpot JVM build version in this 1.6.0_10 build 33, is HotSpot version 11, build 15.

$ java -version
java version "1.6.0_10"
Java(TM) Platform, Standard Edition for Business (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

If you have explored OpenJDK, you may have noticed the Java SE class libraries and HotSpot JVM sources reside in two distinct areas.  The Java SE class libraries source code reside in the "jdk" area and HotSpot source code resides in the "hotspot" area.  Each area can be built independent of each other.

The HotSpot version from "java -version" tells us the version of the underlying HotSpot JVM.  It is probably not very obvious outside Java SE engineering there is a rather clear distinction and separation between what is known as the Java SE class library and underlying HotSpot JVM. Yet to the outside world most everyone looks at the JDK or JRE as a single entity rather than two distinct components assembled together to comprise a JDK / JRE, (there are other components too such as CORBA which can also be built independently).

Friday Oct 10, 2008

OpenSolaris on MacBook Pro, meet my external monitor

I got inspired by Brian Leonard's instructions instructions to install OpenSolaris natively on my MacBook Pro.  His instructions were very good!  I had only one minor change from his instructions.  That was in the running of the fdisk command.  My MacBook Pro / MacOSX version wanted a raw device, i.e. rdisk0, instead of disk0 as an arg to fdisk.

But, I had an additional requirement for my environment.  I've got an external 24" flat panel monitor I wanted to connect my MacBook Pro too. I like as much screen real estate as I can get. :-)


If you have installed or upgraded to OpenSolaris 2008.11, you may have noticed external displays are automatically detected and their resolution, placement, etc are easily manipulated with the "Configure Display Settings" icon in the upper right corner of OpenSolaris.  As a result, if you are running OpenSolaris 2008.11, (or later), you don't need to read the following instructions on how to setup an external display using xrandr commands.  If you are using OpenSolaris 2008.05, then you may find the following instructions useful. 


That proved to be a little bit of challenge, as a result of my MacBook Pro having an ATI graphics card. But, after a little research and trial & error I have it working. It probably would not have been as much of a challenge had my MacBook Pro been using a NVidia graphics card.  I got the impression from reading various blogs and such, support for NVidia graphics cards are much better, not only in OpenSolaris, but other operating systems too. Sorry ATI, this isn't the first time I experienced difficulties in working with ATI graphics cards.

For anyone who has a MacBook Pro with an ATI graphics card, mine has a Radeon Mobility X1600, and if you happen to want to connect to an external monitor, this might help you?

To add an external monitor to my MacBook Pro, I had to add an entry to my /etc/X11/xorg.conf file and use OpenSolaris xrandr to add the display.

Here's the details of what I did.

First, (while booted into OpenSolaris on the MacBook Pro), I added together the desired resolutions I wanted to use from both monitors, MacBook Pro lcd and external, both horizontal and vertical resolutions.  I added both horizontal and vertical so the external monitor could be added above / below, or right-of / left-of the MacBook Pro's lcd, (this will make more sense as you continue to read below).

I then used the OpenSolaris command xrandr -q with the external monitor cable connected to see the supported resolutions of the external monitor and the MacBook Pro's lcd.  I couldn't remember the exact resolutions either lcd or external monitor could support. %-)

Here's xrandr -q report of the resolutions my 24" external monitor and MacBook Pro lcd support:

xrandr -q
LVDS connected 1440x900+0+0 (normal left inverted right) 331mm x 207mm
   1440x900       60.0\*+
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
DVI-1 connected 1920x1200+1440+0 (normal left inverted right) 518mm x 324mm
   1920x1200      59.6\*+   59.9  
   1920x1080      60.0     60.2  
   1600x1200      59.9     60.1  
   1280x1024      76.0     75.0     59.9     60.0  
   1152x921       65.9  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1

Of course, I wanted the highest resolutions. :-)

Next, I added a "Virtual <horizontal max> <vertical max>" entry to the "SubScreen" SubSection of the "Screen" Section in my /etc/X11/xorg.conf file where <horizontal max> is the sum of the horizontal resolutions of the lcd and external monitor I want to have displayed. In my case, I want 1440 on the lcd and 1920 on the external monitor.  Hence, my horizontal max is 3360. Similarly for <vertical max>, sum the vertical resolutions of the lcd and external monitor I want to have displayed.  In my case, I want 900 on the lcd and 1200 on the external monitor. Hence, my vertical max is 1200.  Therefore, the entry I added to my xorg.conf file was "Virtual 3360 2100".  (Note, if you don't have an xorg.conf file and have a MacBook Pro configured with an ATI Radeon X1600 like I have, then just grab the xorg.conf file at the end of this blog entry and use/modify it to suite your needs.)

Here's my "Screen" Section and "SubScreen" SubSection in my xorg.conf file:

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Virtual 3360 2100 # <--- This is the newly added entry

\* My entire xorg.conf can be found below.

After saving the xorg.conf file, I shutdown the laptop, connected the external monitor and booted into OpenSolaris.

After logging into OpenSolaris, I ran the following xrandr commands:

xrandr --output LVDS --auto
\* NOTE: LVDS is my MacBook Pro's lcd screen as seen in the xrandr -q output.
xrandr --output DVI-1 --auto
\* NOTE: DVI-1 is my external monitor's screen as seen in the xrandr -q output.
xrandr --output DVI-1 --right-of LVDS
\* NOTE: This puts my external monitor's display to the "right of" my MacBook's lcd screen.  You can also specify --above, --below, or --left-of.

As a result of the above commands I have my 24" external monitor to the right of the MacBook Pro's lcd. :-)

This is my /etc/X11/xorg.conf file.
--- begin here ---

Section "ServerLayout"
        Identifier     " Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"

Section "Files"
        RgbPath      "/usr/X11/lib/X11/rgb"
        ModulePath   "/usr/X11/lib/modules/amd64"
        FontPath     "/usr/X11/lib/X11/fonts/TrueType/"
        FontPath     "/usr/X11/lib/X11/fonts/Type1/"
        FontPath     "/usr/X11/lib/X11/fonts/Type1/sun/"
        FontPath     "/usr/X11/lib/X11/fonts/F3bitmaps/"
        FontPath     "/usr/X11/lib/X11/fonts/misc/"
        FontPath     "/usr/X11/lib/X11/fonts/100dpi/"
        FontPath     "/usr/X11/lib/X11/fonts/75dpi/"

Section "Module"
        Load  "extmod"
        Load  "GLcore"
        Load  "xtrap"
        Load  "IA"
        Load  "record"
        Load  "glx"
        Load  "dbe"
        Load  "dri"
        Load  "freetype"

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/mouse"
        Option      "ZAxisMapping" "4 5 6 7"

Section "Monitor"
        #DisplaySize      340   220     # mm
        Identifier   "Monitor0"
        VendorName   "APP"
        ModelName    "Color LCD"

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     "NoAccel"                   # [<bool>]
        #Option     "SWcursor"                  # [<bool>]
        #Option     "Dac6Bit"                   # [<bool>]
        #Option     "Dac8Bit"                   # [<bool>]
        #Option     "DDCMode"                   # [<bool>]
        #Option     "IgnoreEDID"                # [<bool>]
        #Option     "DisplayPriority"           # [<str>]
        #Option     "PanelSize"                 # [<str>]
        #Option     "ForceMinDotClock"          # <freq>
        #Option     "ColorTiling"               # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "RageTheatreCrystal"        # <i>
        #Option     "RageTheatreTunerPort"      # <i>
        #Option     "RageTheatreCompositePort"  # <i>
        #Option     "RageTheatreSVideoPort"     # <i>
        #Option     "TunerType"                 # <i>
        #Option     "RageTheatreMicrocPath"     # <str>
        #Option     "RageTheatreMicrocType"     # <str>
        #Option     "ScalerWidth"               # <i>
        #Option     "RenderAccel"               # [<bool>]
        #Option     "SubPixelOrder"             # [<str>]
        #Option     "ShowCache"                 # [<bool>]
        #Option     "DynamicClocks"             # [<bool>]
        #Option     "VGAAccess"                 # [<bool>]
        #Option     "ReverseDDC"                # [<bool>]
        #Option     "LVDSProbePLL"              # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "DRI"                       # [<bool>]
        #Option     "ConnectorTable"            # <str>
        #Option     "DefaultConnectorTable"     # [<bool>]
        #Option     "DefaultTMDSPLL"            # [<bool>]
        #Option     "TVDACLoadDetect"           # [<bool>]
        #Option     "ForceTVOut"                # [<bool>]
        #Option     "TVStandard"                # <str>
        #Option     "IgnoreLidStatus"           # [<bool>]
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "M56P [Radeon Mobility X1600]"
        BusID       "PCI:1:0:0"

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Virtual 3360 2100 # <--- This is the newly added entry

--- end xorg.conf file ---

Friday Feb 15, 2008

Out of hibernation :-)

It is still winter here.  But, I have come out of hibernation!!!

It has been quite a long time since I have last blogged and there is plenty to talk about.  I had been very consumed the past couple months with Java SE performance work.  You will see announcement coming soon about one of our accomplishments in this area early next week.

What really brought me out of hibernation was the chance to do some work on Project Grizzly.

At Project Grizzly, we had started talking about what we wanted to accomplish with Grizzly 2.0 development.  Actually, initial Grizzly 2.0 development started about 18 months ago.  It originally started as an internal (Sun) effort called Project Peregrine.  We had plans to rename it Grizzly 2.0, but that did not happen since Peregrine had deviated quite substantially from Grizzly 1.0 and there were quite a few folks who had built applications on Grizzly 1.0.  As a result, we decided to open source Grizzly 1.0 and begin development of Grizzly 1.5.  But, we had some concepts and artifacts in Peregrine we did not want to completely abandon such as a TransportConfiguration where you could specify a transport configuration and give it to a TransportManager who was responsible for managing the transport.  We hope to integrate those kinds of functionality into Grizzly 2.0.  We also concluded there may be some folks in the Grizzly community who may have some interest in looking at what was started with Project Peregrine.  So, today I put the Project Peregrine source code in Project Grizzly repository in the trunk/contribs/peregrine directory.

There is also a www directory which as a description of the concepts and abstractions utilized in Project Peregrine.  There is also a couple simple example programs which use Project Peregrine.

Both the examples and Peregrine source code are setup to be easily opened from NetBeans IDE.  Although, Project Grizzly uses Maven, these contributions currently is using Ant.  Feel free to take a look and if you find something of use, feel free to use it.

Disclaimer:  The peregrine source code is not claimed to be in a stable or completed state.  Use at your own risk.

<script src="" type="text/javascript">
<script type="text/javascript">
_uacct = "UA-3111670-1";

Wednesday Dec 19, 2007

NetBeans 6, Maven & Grizzly

Many of my readers know that I am involved with Project Grizzly and there are some new developments at Project Grizzly that are likely of interest to NetBeans users and users of Maven in their projects.  To coincide with the release of Grizzly 1.7.0, which is full of many new capabilities, we also got a very good tutorial contribution from Miro Nachev which shows how easy it is to use NetBeans IDE 6 along with the Maven plug-in to download the Grizzly source files from the Subversion repository, build and test the Grizzly project. Miro's contribution can be viewed here.  Miro is also interested in using Grizzly to build an RTP stack. That is also exciting news! Ooh, and I almost forgot ... Miro got one of those highly sought after Grizzly t-shirts too. :-)

Having been a fan of NetBeans decision to have integrated Ant as part of its project system, seeing Maven integrated and work in a similar manner is just plain great.  Btw, Maven integration into NetBeans probably wouldn't be nearly as good as it is without the tireless work of Milos Kleint.

Powered by ScribeFire.

Wednesday Nov 07, 2007

Favorite NetBeans IDE 6 Feature

Likely anyone who's reading this already knows NetBeans 6 is in beta. I really like what I'm seeing in NetBeans 6. I started using NetBeans 6 at milestone 10 and haven't looked back. ;-)

With all the great enhancements with NetBeans 6, my favorite feature is not an editor feature, newly added plug-in, etc. My favorite feature is the ability to download a 'Base IDE for Java SE'. It's a small 20 MB download, less than 1/2 the size of what I downloaded for 5.x, and gives me exactly what I need.

Wednesday Sep 26, 2007

Project Packager plug-in for NetBeans IDE 6.0

I had a want / need to use the Project Package plug-in originally developed by Roman Strobl, but I couldn't find a copy of the 'nbm' and I was not sure if the version developed for NetBeans 5.5 would work with NetBeans 6.0.  (The Project Packager plug-in is a simple plug-in which allows you to easily import & export NetBeans projects. It also allows you to e-mail an exported NetBeans project, which is one of my favorite features).

So, I downloaded the source and built it for a NetBeans 6.0 target.

If anyone would like to grab the 'nbm', go for it. It appears to be working fine with NetBeans IDE 6.0 Beta 1 on Solaris x86 ;-)

Powered by ScribeFire.

Sunday Jul 22, 2007

Free-form NetBeans projects and FindBugs plug-in

I have been exchanging a couple e-mails with Sven Reimers one of the maintainers / developers of the FindBugs plug-in for NetBeans.

Several NetBeans 5.5.x IDE users discovered the FindBugs plug-in was not working properly with NetBeans free-form projects.

Sven has just posted an updated NetBeans FindBugs plug-in to the FindBugs update center.

I have tested it with a rather large NetBeans free form project, (nearly 4000 Java source files), and it is working.

I did, however, need to increase my max Java heap size (-Xmx) value in my NetBeans IDE configuration file, <NetBeans install dir>/etc/netbeans.conf, file.  For the large free form project I was running Sven's updated FindBugs plug-in against, I needed to configure a max Java heap of 768m, (i.e. set -Xmx768m).

Yeah, that sounds pretty large.  But, I do not think that's the plug-in's fault.  It may be an artifact of FindBugs?  After the analysis completed and displayed the results in the FindBugs output window in NetBeans IDE, I forced a Full GC and the Java heap was reduced from 492m down to 90m.

Thanks Sven for quickly identifying the problem and delivering an update to the NetBeans FindBugs plug-in!

Powered by ScribeFire.

Friday Jul 06, 2007

who wants a t-shirt ?

That subject is certain to grab the attention of quite a few readers :-)

Now you are probably thinking, what do I have to do to get a t-shirt and what do these t-shirts look like?

Here is the t-shirt:

This is a Project Grizzly t-shirt.

What do you have to do to get a t-shirt?

Project Grizzly is looking for some contributions.  :-)

Here is a list of contributions, in priority order, we are looking for at Project Grizzly.  If you are interested in contributing one of these items on the list, let us know at Project Grizzly by sending us an e-mail saying which one of the items you are interested in committing.  The first person to e-mail on a given contribution will be slotted for that contribution.  Additional instructions such as where to send your contribution will be in a return e-mail confirming you have been selected for a given contribution. Once your contribution is complete we will make every effort to ship you your Project Grizzly t-shirt. Shipping internationally can be challenging sometimes :-(

Here is the list of contributions:
  1. A written tutorial on how to retrieve and build the Project Grizzly source code using NetBeans Meven IDE for NetBeans IDE 6.
  2. A written tutorial on how to retrieve and build the Project Grizzly source code using NetBeans Meven IDE for NetBeans IDE 5.5 / 5.5.1.
  3. A written tutorial on how to create a simple Grizzly based server such as a logging server with instructions on how to build it and run it along with at least one test case to run against it.  NOTE: To accept the source code contribution you will need to sign and return Sun's Contributor Agreement and return it here if you have not done so previously.
  4. A written tutorial on how to build a simple application using Grizzly UDP with instructions on how to build it and run it along with at least one test case to run against it. NOTE: To accept the source code contribution you will need to sign and return Sun's Contributor Agreement and return it here if you have not done so previously.
  5. A written tutorial on how to use Grizzly's connection caching including a run-able example. NOTE: To accept the source code contribution you will need to sign and return Sun's Contributor Agreement and return it here if you have not done so previously.
  6. A contribution to integrate FindBugs as a maven task so it can be executed automatically from the command line as well.  NOTE: To accept this contribution you will need to sign and return Sun's Contributor Agreement and return it here if you have not done so previously.
  7. A written tutorial on how to integrate the FindBugs plug-in for NetBeans IDE and run it from within NetBeans IDE 5.5 / 5.5.1.
  8. A written tutorial on how to integrate the FindBugs plug-in for NetBeans IDE and run it from within NetBeans IDE 6, (Note: the FindBugs plug-in may not operational in NetBeans IDE 6).
  9. A contribution to integrate CheckStyle as a maven task so it can be executed automatically from the command line as well.  NOTE: To accept this contribution you will need to sign and return Sun's Contributor Agreement and return it here if you have not done so previously.
  10. A written tutorial on how to integrate the CheckStyle plug-in for NetBeans IDE and run it from within NetBeans IDE 5.5 / 5.5.1.
  11. A written tutorial on how to integrate the CheckStyle plug-in for NetBeans IDE and run it from within NetBeans IDE 6, (Note: the CheckStyle plug-in may not operational in NetBeans IDE 6).

If you have some additional thoughts or ideas similar those above that you believe are worthy contributions to warrant a Project Grizzly t-shirt, feel free to add a comment to this blog.

Powered by ScribeFire.

Wednesday Jun 27, 2007

Free Sun Studio 12, and NetBeans Profiler

Ok ... so what does Sun Studio 12 have to do with NetBeans and the NetBeans Profiler ?

Sun Studio 12 is built on NetBeans.

But, isn't Sun Studio 12 for native languages?

Not exclusively, no.

There are two programs which are part of Sun Studio which I use quite often and find very useful in my Java development.  They are called Collector & Analyzer.   The Collector collects performance / profiling data into a what is called an experiment file and the Analyzer is a program that reads the experiment file.

Aahh, so the Collector / Analyzer is a competitive product to the NetBeans Profiler?  No, not exactly.  In fact they compliment each other rather well.

I find the Collector / Analyzer very useful as the first tool in profiling a Java application.  By default the Collector samples a running Java application once per second and includes in its profiling data not only user cpu time and system / kernel cpu time, but also lock contention information, (amongst quite a bit more information).

I find the Collector / Analyzer is very good at giving me a very quick high level view of the performance of a Java application.   Where I like to use the NetBeans Profiler is once I have found an area, or a couple areas of interest, by using the Collector / Analyzer, I use the NetBeans Profiler to instrument specific methods or call points.   Hence, the ability to focus on specific areas of an application is what I find is the NetBeans Profiler's strong point.

Back to the Collector / Analyzer .... A couple additional things it can do ...

Finding contended locks which are performance & scalability "blockers" in a Java application can be a difficult task.  But, Sun Studio's Collector / Analyzer makes this task much easier.  It can display the amount the time spent waiting to acquire Java locks.  Not many profilers can do this and this is one of my favorite features of Collector / Analyzer.

You can also narrow the scope of the profiling run to a specific set of samples.  So, if your application goes through a startup phase you can eliminate those samples from the collected data.

In addition to looking at Java methods, you can also get information about how the JVM, i.e. HotSpot, is performing.  That's right you can see HotSpot method information too.  And, on Solaris Sparc and Solaris x86 (this may be available on Linux too?) you can view the assembly language instructions generated by the JIT compiler for given Java methods.  Perhaps not that interesting to most Java developers.  But, it can be interesting to those of us who are performance junkies :-)

Have I peaked your interest?

How easy is Collector / Analyzer to setup and configure?

It's as easy as a Sun Studio 12 download, installation, adding the <install dir>/bin directory to your PATH and then starting your Java application with:  collect -j on <your old Java command line>.  For instance, if you were running a Java command line such as,  java -server -jar Java2Demo.jar,  you would simply start the collector by issuing a command line of, collect -j on java -server -jar Java2Demo.jar.

Running the collect command will automatically create an experiment file in the directory where you launched the collect command.  The file name will be of the form, where # begins at the number 1 and increments as needed as you run more collector experiments.

Once you've completed the execution of your Java program, you open the experiment file, the file, using the Analyzer which is as easy and typing, analyzer at the command line, (assuming you have the <install path>/bin directory in your PATH).   You simply open the experiment file with the Analyzer.   From there you can choose to "Filter Data", add additional columns of data to the display to include sys time and lock time, etc.

Perhaps you should try it out for yourself ... A free download is available at:

There's additional information on how to use Sun Studio 12 and the Collector / Analyzer at:


Powered by ScribeFire.

Sunday Jun 03, 2007

Mac a good Java development platform ... NOT!

There is a poll on asking 'Is the Mac a good Java development platform?".  Rather than posting a (lengthy) comment to the poll, I thought a blog entry would be a better way to share my experience.

I am certain to offend many Mac lovers with this blog entry.

I have an Intel 2.33 GHz MacBook Pro w/ 2G of RAM.  Actually my wife bought it for me as a Christmas present.

Perhaps you are thinking, "Wow what a great Christmas present!" ?

Let me tell you about my (user) experience ...

I was quite excited  about the MacBook Pro.  I too had gotten a little caught up in Mac (over) hype.  But, my experience has been much less than what I would call good.  During the first 3 months I had the MacBook Pro, the OS would crash (complete machine reboot) on average about once every 8 hours of usage.  And, it would lock up on average about every 4 times coming out of a hibernate. And, I had several web sites that I visited frequently which would not open with Safari, (I even tried using Opera and FireFox too).   Not what most of you reading this would have expected from Mac?

Don't worry it gets better .... I got an e-mail from a company who was doing a "Give us (Apple) feedback on your MacBook Pro experience".  I had to laugh when I tried to open the URL in the e-mail only to find Safari would not load it.  I contacted the person who sent the e-mail to me.  Actually, that's how I found out that Apple was not the one doing the survey, they (Apple) had outsourced that task to the fella's company I was e-mailing.  Quite honestly the fella I e-mailed was very responsive and I found him quite helpful.  I tried many of the suggestions he gave me.  Unfortunately none of those helped.  He also attempted to get me some help from someone at Apple. But, no one from Apple ever responded.  It was about this same time that I had the '/' '?' key for no apparent reason decide to fall off the keyboard.

You can probably imagine what my attitude towards my MacBook Pro was about this time.

A few weeks went by, I had completely quit trying to use the machine.  For some reason I powered it on, I got a notification of an OS update.  I applied the update (patch).  Don't know what possessed me to try the web sites that would not previously open, but much to my amazement they started to open.  I began to use the MacBook Pro for the next several days in one last attempt to see I could figure out what some people had been telling me was "the Mac experience".
I used the MacBook Pro for the next several days.  The frequent OS crashes seemed to have disappeared and the frequent lock ups after hiberates seemed to have disappeared as well. But, I never did figure out what some people have found to be so wonderful about a Mac. 

The positives for the MacBook Pro are:   wireless connectivity is better than anything else I have used, hibernate (now that it works) is better than anything else I've seen.  On the negative side;  I hate the "menu at the top of the screen".  For someone who has become to use to menus on the main window of a program, I don't think I would ever get used to Mac's approach.  I also hate the fact of not having a right click-able mouse.  The only way I can get a right click-able mouse is via the attached wireless mouse, (of which did not come with my Mac).

The best thing I did with my MacBook Pro was downloading VMWare Fusion and installing OpenSolaris.  Now when I travel I take the MacBook Pro, use it's wireless connectivity and good hibernate support.  But, other than that .. that's it for me.  I always promptly boot up OpenSolaris.  I don't think I will ever be as productive (as a Java Developer) with a Mac as I'll be with Solaris.  My desktop development machine also runs OpenSolaris. I tried for several days to see if my productivity would improve in a MacOS environment but it didn't happen.  It's only when I boot OpenSolaris on it do I feel at home.

Powered by ScribeFire.

Friday Jun 01, 2007

How to set and use different JDK versions in NetBeans (5.x)

A co-worker of mine asked me ...

"if I want to try various versions of JDK, how do I tell NB to use a particular version of JDK for compiling my sources (or run the class files for that matter..) ?"

For NetBeans 5.x, there's two answers to the question :-)

It depends on the NetBeans Project.

If it is not a free-form Project it is very easy :-)   You simply right click on the project name in the Project Windows and select Project Properties..  Then in Project Properties window, click on the Libraries node in the left panel.  In the right panel you will see "Java Platform:" label, followed by a drop down list and a "Manage Platforms" button. Click on the "Manage Platforms" button to launch the Java Platform Manager window. Click on the "Add Platform" button, traverse the directory structure to find your additional JDK platform.  You can add as many as you like. After adding your additional JDK platforms, click "Finish" / "Close" to return back to the Project Properties window.  In the Project Properties window, you can now select the additional JDK platforms from the "Java Platform" drop down list.  The one you select and press "Ok" will be the one NetBeans will use for you project.  You can also add JDK platforms by selecting Tools > Java Platform Manager from the main menu.  But, you change the default JDK in the Project Properties.

For free-form projects, you have to set the target JDK in your Ant script, (most Ant scripts pick up the target JDK by looking at the JAVA_HOME environment variable.

Also for free-form projects, to configure the IDE to show the correct JDK's classes for code completion, Javadoc documentation, and source files, you must register the JDK in the Java Platform Manager dialog box.

Powered by ScribeFire.

Thursday May 24, 2007

Java NIO & Project Grizzly JavaOne Technical Session Slides

At the JavaOne conference a couple weeks ago we (Jeanfrancois Arcand, Scott Oaks & I) had quite a few folks ask if we would post our presentation slides to one or all of our blogs.  Those slides, (Tips and Tricks with NIO, Using the Grizzly Framework) are now available here.

For those who have not heard about Grizzly, you might be interested in looking at the slides too since there's a small section on "what is Grizzly" and a "history of Grizzly".

And, for those interested in a Grizzly t-shirt, watch for an upcoming announcement at the Project Grizzly web site  Or, just click on the Grizzly image below.

Powered by ScribeFire.

Wednesday Apr 25, 2007

Much smaller NetBeans download

I have been working with the nightly builds of NetBeans 6.0 and the NetBeans Installers

Since I have largely been working on stand alone Java applications I do not need any of the Java EE functionality, I have been able to download a 20MB NetBeans IDE 6.0 version(s).  Not only can I enjoy a faster download, NetBeans IDE startup time is better too.

If you haven't had a chance to work with the NetBeans Installers at, you should.  I think this is great idea and a good direction for NetBeans IDE  where hopefully we will be able tell a NetBeans download page the type of development we plan to do and it will assemble the components in a NetBeans IDE we need.

Powered by ScribeFire.

Monday Apr 09, 2007

Project Packager

I had completely forgotten about a plug-in module Roman Strobl created over a year ago called Project Packager.  I was working with NetBeans 6.0 M8 (Milestone 8) when I noticed it in the Update Center.  That happened to be great timing since I was just about ready to send a co-worker of mine a NetBeans project which contained an optimization for one of the JDK class libraries.  Kudos to Roman for also including the ability to e-mail the exported NetBeans project.  In addition, he has the ability to import the packaged NetBeans project.

If you're not on NetBeans 6.0, you can get the Project Packager from

Nice job Roman!

Powered by ScribeFire.




Top Tags
« December 2016