What in the Hyades?

Posted on Dec 29, 2004

Step 1:

There are some prerequisites for using Hyades, namelu the Eclipse Modeling Framework (EMF) and the XML Schema Infoset Model (XSD). Those are both best installed using Help > Software Updates > Find And Install > Find new features As of this writing, (Eclipse 3.01) Eclipse lists one 2.01 plugin that includes both XSD and EMF. Download that and then get started.

Step 2:

Get the Hyades files from the Download page. As of this writing, Hyades is on release 3.2.0. It does appear that the project is about to get folded into another Eclipse initiative, but who knows how long these things will take? Here’s what we have right now.

Step 3:

Unzip all the Hyades runtime, examples, and component test archives to the base Eclipse install directory. Remember NOT to extract them to the plugins directory, as the archives include elements destined for the plugins and features directories of Eclipse.

Step 4:

Fortunately for us all, the description of installing the Data Collection Agent is easy to follow and needs no amendment. Go ahead and take care of this prerequisite first by following the installation instructions.

Step 5:

My advice is to not go around to the different examples to figure out what’s going on. Just start trying to get Tomcat up and running. I use the Sysdeo Tomcat plugin, which gives some very useful pointers on how to start up Tomcat within Eclipse. If you are not currently running Tomcat within Eclipse, for god’s sake, quit this tutorial right now and install the Tomcat plugin. It’s straightforward, but feel comfortable working with it before you take the next step.

Step 5a:

Get your web application up and running comfortably within it. That portion may be somewhat less straightforward, but I believe in you! One item to note, you should include as “external JARs” in your libraries the entries of TOMCAT_HOME/common/lib These will will be part of your running classpath. You may even find this useful in getting your web application running, especially if your application is using libraries itself.

Step 6:

Start a Tomcat session using the Start Tomcat command. Switch to the Debug perspective. Right click on the running Tomcat application and select the Properties option. Copy and paste this into your favorite text editor we’ll use it to help us configure the profiler.

UPDATE: You can also use the Create A Launch Configuration button inside of the Windows > Preferences > Tomcat menu.

Step 7:

Use the skills you learned from installing the Tomcat plugin to make the Profiling and Logging perspective show up, as well as the Profile button on the toolbar. From the Profile button, select that option. You should see a screen much like the picture below. Click on Java Application > New and you’ll have an opportunity to begin defining the Java project.

For the Project section, choose the project that you set up in Step 5.

For the Main class, you want org.apache.catalina.startup.Bootstrap for the Tomcat 5 varieties. If something else is in your clipboard entry from Step 6, use that instead, but YMMV.

Step 8:

For the program arguments, select everything that comes after the main class you used in Step 7.

For the VM arguments, use all the elements you passed in using the -D technique, this is everything after the Java invocation but before the classpath declaration. Of course, your values will differ based on where you have installed Tomcat, but it should look somewhat similar to the picture.

Step 9:

Begin with the defaults, which include the Java standard libraries as your boot classpath and your own web application’s libraries (as defined by your project) as the user classpath. Note that not all of these steps may be necessary if you followed the updated instructions above.

Add your TOMCAT_HOME/bin/bootstrap.jar as the next entry after the defaults.

Add the libraries in TOMCAT_HOME/server/lib/ as the next entries.

Add the JAVA_HOME/lib/tools.jar from your JDK so that Tomcat can compile your Java files. (Note that this may not be necessary with Tomcat 5.5)

If you use Apache’s log4j project, you’ll likely end up with that jar in TOMCAT_HOME/server/lib/. As a result, you’ll have to provide some directory for the classpath that contains a log4j.properties file so that the log4j system can initialize itself appropriately.

Step 10:

Start it up! (Make sure that you’re running the data collection service mentioned in Step 4.)

If you want to be gathering other data, you’ll want to visit the Profiling tab on the configuration menu that we’ve been working with. Create a new profiling set and you’ll be in shape.


I’m absolutely thrilled to have a profiler added to my toolkit, much less one that will be easily accessible from within my IDE. Also, I strongly suspect that this product will be vastly improving in quality along with the rest of Eclipse as time passes.