![]() |
![]() |
![]() |
![]() |
2 Configuring OptimizeIt
This chapter describes how to configure the OptimizeIt software for operation with your Java application. It includes the following sections:
· Selecting a virtual machine
· Setting the source code location
· Changing the class path
· Configuring servlet support
These settings are global settings that can be customized for each applet or application you are profiling.
2.1 Selecting a virtual machine
OptimizeIt profiles your program's performance while it runs on a Java virtual machine. By default OptimizeIt profiles using a Java 2 runtime.
OptimizeIt is compatible with most Java version 1.1, 1.2 and 1.3 virtual machines including the following:
· Sun Microsystems® Java Development Kit (JDK) Version 1.1.6 or newer, 1.2 and 1.3
· Borland® JBuilderTM Version 1.0 or higher
· Symantec® Cafe Version 2.5 or 3.0
· IBM Java Development Kit JDK 1.3
OptimizeIt includes a Java Runtime Environment (JRE) 1.2. The first time you run OptimizeIt, a Java setup wizard is started. If you want to use the default JRE 1.2 included with OptimizeIt, just click Cancel. If you want to configure OptimizeIt to use a different virtual machine, click Next. Select the directory where you want the wizard to search for available virtual machines. The wizard scans the selected directory or drive and lists all available virtual machines (after you see the message "Found 1 virtual machine" you can click Stop to end the scan). Select the virtual machine you want to use in the list of found virtual machines, click Next, then click Finish.
After changing the default virtual machine, OptimizeIt prompts you to ask whether the new default virtual machine should be used with the current settings. Click Yes to start using that virtual machine.
At any time, you can change which virtual machine OptimizeIt uses from the Virtual machine tab of the Settings editor, See "Adding a virtual machine" on page 19.
2.2 Setting the source code location
When OptimizeIt has access to the source code for an application, it highlights the relevant lines in the source code. If the source code is not accessible, OptimizeIt can still provide profiling information for the Java classes.
OptimizeIt maintains a source path which is a list of directories containing source code. OptimizeIt searches each directory in the source path in the order specified when it requires a source file. The Preferences panel can be used to change the default source path in OptimizeIt.
Changing the default source path
1. Select Preferences from the Edit menu.
2. Select Default source path in the top selection box.
3. Click the Edit button.
4. The Source Path Chooser opens.
5. In the top box, select the directory you want to add.
6. Choose the directory that contains the top-level package of your Java source code. If you aren't sure, select any Java file in your application and OptimizeIt will add the appropriate directory.
7. Click the down arrow to add your selection to the source path.
8. Repeat these steps for other directories you want to add to the source path.
9. Click the OK button.
10. Click the OK button to close the Preferences dialog box.
Note: When a Java file is not available, OptimizeIt prompts you to locate the missing Java file. After you select the missing Java file, a dialog box prompts you to add the file's directory to the default source path.
To set a different source path for an applet, a servlet or an application that you are profiling with OptimizeIt, define the changes to the default source path in the Settings editor.
2.3 Changing the class path
When OptimizeIt launches your applet or application, the Java virtual machine needs the location of classes your application uses. By default, OptimizeIt points to the classes that are defined in your CLASSPATH environment variable.
OptimizeIt maintains a class path which is a list of directories containing class files. OptimizeIt searches each directory in the class path in the order specified when it requires a class. If you have some classes, zip files or jar files that you always want available to all test programs, add them to the default OptimizeIt class path.
Changing the class path
1. Select Preferences from the Edit menu.
2. Select Default class path in the top selection box.
3. Uncheck the Use CLASSPATH environment variable option.
4. Click the Edit button.
5. In the top box, select the directory, zip file or jar file you want to add to the class path. If you choose a directory, make sure you select the directory containing the top-level package of the source tree.
6. Click the down arrow to add your selection in the class path.
7. Click the OK button.
8. Click the OK button to close the Preferences dialog box.
Note: To set a different class path for an applet or application you are profiling with OptimizeIt, define the changes to the default class path in the Settings Editor.
2.4 Configuring servlet support
In order to be able to start the profiling of a servlet directly from OptimizeIt, you need to configure OptimizeIt with a servlet runner. You need one of the following servlet runner jar file: jsdk.jar, server.jar or webserver.jar. These jar files can be found in several software installations: JSDK 2.0 or 2.1, JSWDK 1.0, JBuilder 3, JDeveloper 2, VisualCafe 3 or 4, WebSphere. If you don't have any of this software installed, we suggest that you download and install the Java Servlet Development Kit 2.1 (JSDK 2.1) from http://java.sun.com/products/servlet/download.html.
Configuring servlet support
1. Select Preferences from the Edit menu.
2. Select Servlet in the top selection box.
3. Click on Servlet setup. This opens the servlet configuration wizard.
4. Click on next.
5. Select a directory where you want to search for one of the servlet runner jar file then click on next.
6. When OptimizeIt has finished its search, it displays the available jar files found in a table. Select one line in the table then click next.
7. Click finish.
Changing the port used by the servlet runner
When you start the profiling of a servlet from OptimizeIt, OptimizeIt runs your servlet in a servlet runner. The default port used by the servlet runner is 8080. If you have another application that already uses that port, change the port number:
1. Select Preferences from the Edit menu.
2. Select Servlet in the top selection box.
3. Change the value of the port in the corresponding section.
Intuitive Systems http://www.optimizeit.com optimizeit@intuisys.com |
![]() |
![]() |
![]() |
![]() |