Sun Microsystems Logo
First Previous Next Last Overview
 

LAB-1205: Java Application Performance Analysis

Exercise 21: Demonstrate the Swing Set 2 application

Learning goals of this exercise

In this exercise you will learn:

Background for this exercise

Please see Exercise 1 for an overview of running the javaperf GUI launcher.

We have used only the Java 2D Demo application up to this point.  The javaperf GUI launcher can be adapted to use other applications as well.  This is an example of using the Swing Set 2 application.

Steps to follow

  1. The JAVAPERF_HOME/conf/exer21.properties file contains:
    # javaperf hands-on lab properties for an exercise
    exer.jar=${demo.home}/jfc/SwingSet2/SwingSet2.jar
    exer.logs=${javaperf.logs}/exer${exer.num}
    exer.log=${exer.logs}/SwingSet2.log
    exer.name=${exer.num}: Demonstrate the Swing Set 2 Application
    exer.compiler=
    exer.heap=-XX:PermSize=12m -XX:MaxPermSize=12m -XX:NewSize=4m -XX:MaxNewSize=4m -Xms64m -Xmx64m
    exer.gc=-XX:+DisableExplicitGC
    exer.other=
            

  2. Click [Start]. You will see the Swing Set 2 application start...

  3. Perhaps one of the most interesting demonstrations (in terms of generating objects) is in the JTabbedPane example, click on "Bouncing Babies".

  4. Quit the Swing Set 2 application by clicking [Stop]

  5. Note that the GC settings used here are not optimal (for Bouncing Babies!).

Summary

This is an example of using the javaperf GUI launcher to visualize the behavior of a different application.