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 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="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-3111670-1";
urchinTracker();
</script>

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, test.#.er 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 test.#.er 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: http://developers.sun.com/sunstudio/downloads/index.jsp

There's additional information on how to use Sun Studio 12 and the Collector / Analyzer at:
http://developers.sun.com/sunstudio/

Enjoy!


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 http://nbi.netbeans.org, 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 http://www.nbextras.org

Nice job Roman!


Powered by ScribeFire.

Sunday Apr 01, 2007

Grizzly 1.5 Architecture Review

It has been quite a little while since I have posted a blog entry.  That usually means I have some high(er) priority tasks I've been working on.

So, what have I been up to lately?    Project Grizzly

Jeanfrancois did an architecture review / concept review of Grizzly 1.5 last Thursday.  Next week we will be doing code review of Grizzly 1.5 so Grizzly 1.5 can be officially released.

In its initial days, Grizzly started as an HTTP web connector for GlassFish's web container.  Grizzly's performance as an http web connector has been so impressive it made sense to remove the http protocol specific elements from the Grizzly HTTP web connector.  That work has lead to Grizzly 1.5. With Grizzly 1.5 one can add his or her own protocol and realize the high performance available in the Grizzly HTTP web connector.  Of course, Grizzly 1.5 is open source and you can use it too.

Jeanfrancois and I will be presenting Grizzly to our friends in Brazil at FISL 2007 Conference, Porto Alegre this month. I do not know which date of the conference we will be presenting as of yet.

At JavaOne Jeanfrancois, Scott Oaks, Alan Bateman and I will be presenting many of the tips and tricks to effectively using Java NIO in a session titled, Tricks and Tips with NIO, Using the Grizzly Framework. Hope to see you there!




Powered by ScribeFire.

Sunday Sep 17, 2006

How to find & install FindBugs plug-in for NetBeans

There has been some discussions at Sun on using FindBugs, the static analysis tool, to help isolate potential bugs before they are committed to a builds.

Thought I would share how get and install the FindBug plug-in for NetBeans.

The instructions below are for NetBeans IDE 5.5. They should work for NetBeans 5.0 also.

1. Launch NetBeans.
2. Select Tools > Options from the main menu.
3. Click on the "Advanced Options" button in the lower left.
4. Expand the node "IDE Configuration > System.
5. Right click on "Autoupdate Types" and select "New > General Update Center".
6. In the "Name:" field enter "FindBugs Update Center" and click on the Finish Button.
7. Back on the Advanced Options dialog, expand "IDE Configuration > System > Autoupdate Types" and you will see a new update center type for the name you just entered in #6.
8. Select the label on the left hand side called "FindBugs Update Center". On the right hand side, enter the following URL for the "Server URL" entry:
https://sqe.dev.java.net/updatecenters/nbheaven-updatecenter.xml
\*\* NOTE: Use "https", not "http".
9. Make sure the "Enabled" box is checked.
10. Click on the "Close" button to exit the Advanced Options dialog.
11. Select Tools > Update Center from the main menu.
12. You'll now see "FindBugs Update Center" as one of the Update Centers to connect too.
13. If you are behind a firewall and need to configure a proxy, click on the "Proxy Configuration" button. Set your proxy configuration as needed.
14. Click the "Next" button to connect to the Update Center(s).
15. In the Update Center dialog, scroll down in the "Available Updates and New Modules" and look for the "FindBugs Update Center".
16. Under the "Software Quality" folder, select "FindBugs NetBeans Integration" and click on the "Add > " button.
17. Click on the "Next" button on the "Update Center" dialog.
18. Accept the licenses.
19. NetBeans will then prepare to install the FindBugs plug-in. Press the "Next" button when the pre-installation completes.
20. On the "Update Center" dialog, be sure to select the check boxes on the left hand side under the "Include" column. NetBeans may ask you if you want install a "unsigned module". If it asks you this question, answer "Yes to All" or "Yes".
21. Check the "Include" box for each module, (all of them).
22. After you have checked the "Include" button on all modules, click on the "Finish" button.
23. Now NetBeans will install the FindBugs plug-in.
24. When it is finished you will see a "FindBugs" icon in the toolbar.
25. When you have a project open, you can click on FindBugs to execute the FindBugs static analyzer. In the Output Window you will see what it has detected as potential bugs.

Enjoy!!!

About

charliebrown

Search

Top Tags
Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today