NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
J2SE 5.0 introduced a new graphical monitoring tool for the JVM called jconsole. This cool new tool let you grab information about pretty much anything in the JVM: classpath, libpath, occupied memory, number of running threads, loaded classes, and so on. It also allows you to graphically study the state of the eden, the tenured space, the survivor spaces and the young space to see how the GC works.
To run this tool you'll need to add some flags to the command line you use to start your Java applications. The easiest setup is local monitoring:
In this example, the -XX:+PerfBypassFileSystemCheck option is required only if you are under a FAT32 based Windows setup. To remotely monitor your application, just use this command line instead:
The default monitoring options require SSL, which has been deactivated here. We also bypassed the authentication stage. To get more information about these options you should refer to Sun Microsystem's documentation. Anyway, now your application is running in monitoring mode, you can launch jconsole:
# local monitoring, you'll have to check the running
# tasks list of your OS to retrieve the PID associated
# with your application (Ctrl+Shift+Esc on Windows will
# bring you the required window)
> jconsole PID
# remote monitoring, for example localhost:8463
> jconsole host:port
Two other tools can take advantage of JVM monitoring: jstat and jps. The latter can list all the virtual machines running in monitoring mode on a given computer. Here is how we can use it to get the PID of the monitored virtual machine we previously launched:
$ jps
1884 jext-5.0.jar
Knowing the PID, we can now use jstat to get a bunch of statistics. In this example we display classes related stats:
This tool can do much more. For instance, you can use -gc to monitor the garbage collector. I suggest you to check out the list of available options by typing jstat -options.
These new tools are really efficient and will definitely help you tune your applications. I bet you'll love jconsole
J2SE 5.0: Watch the HotSpot at work
At 11:30 AM on Mar 23, 2005, Romain Guy
wrote:
Fresh Jobs for Developers Post a job opportunity
To run this tool you'll need to add some flags to the command line you use to start your Java applications. The easiest setup is local monitoring:
In this example, the -XX:+PerfBypassFileSystemCheck option is required only if you are under a FAT32 based Windows setup. To remotely monitor your application, just use this command line instead:
The default monitoring options require SSL, which has been deactivated here. We also bypassed the authentication stage. To get more information about these options you should refer to Sun Microsystem's documentation. Anyway, now your application is running in monitoring mode, you can launch jconsole:
Two other tools can take advantage of JVM monitoring: jstat and jps. The latter can list all the virtual machines running in monitoring mode on a given computer. Here is how we can use it to get the PID of the monitored virtual machine we previously launched:
Knowing the PID, we can now use jstat to get a bunch of statistics. In this example we display classes related stats:
This tool can do much more. For instance, you can use -gc to monitor the garbage collector. I suggest you to check out the list of available options by typing jstat -options.
These new tools are really efficient and will definitely help you tune your applications. I bet you'll love jconsole
0 replies so far (
Post your own)