JProfiler as a JBuilder OpenTool

     


  With JProfiler integrated into Borland's JBuilder, JProfiler can be invoked from within the IDE without any further need for session configuration.

Requirements: JProfiler requires at least JBuilder 7.0

  The installation of the JBuilder OpenTool is started by selecting "JBuilder 7 to 2005" on the and clicking on [Integrate]

Reminder: Please close JBuilder while performing the OpenTool installation. If you are performing the installation from JProfiler's setup wizard, please complete the entire setup first before starting JBuilder.

A file selection box will then prompt you to locate the installation directory of JBuilder.

After acknowledging the completion message, you have to start JBuilder and set JProfiler as the optimizer for your project. Invoke Run->Configurations from JBuilder's main menu, select a runtime configuration, press [Edit] and select the "Optimize" tab in the resulting runtime properties dialog. If an optimizer type with the name "JProfiler" exists on this tab, the OpenTool was recognized correctly. Activate this optimizer and then click [OK].


Optimizer configuration dialog
 

  To profile your application from JBuilder, choose one of the profiling commands in the Run menu or click on the corresponding toolbar button.


Main toolbar with "Optimize" button
 


"Run" menu with "Optimize" actions
 


Project explorer context menu with "Optimize" action
 

The profiled application is then started just as with the usual "Run" commands. If no instance of JProfiler is currently running, JProfiler is also started, otherwise the running instance of JProfiler will be used for presenting profiling data.

Every time a run configuration is profiled, a dialog box is brought up that asks you whether a new window should be opened in JProfiler. To get rid of this dialog, you can select the "Don't ask me again" checkbox. The window policy can subsequently be configured in the optimizer settings in JBuilder (see below).

All profiling settings and view settings changes are persistent across session restarts.

When JProfiler is started from JBuilder, the "Show source" action for a class or a method in one of JProfiler's view will show the source element in JBuilder and not in JProfiler's integrated source code viewer.

  Several JProfiler-related settings can be adjusted in JBuilder under Run->Configurations->Edit->Optimize:
  • The used JProfiler installation can be changed by repeating the integration from JProfiler or by adjusting the JProfiler executable in the corresponding text field. When you upgrade to a newer version of JProfiler, make sure to repeat the integration, since the OpenTool has to be updated, too.
  • The window policy can be configured as
    • Ask each time
      Every time you profile a run configuration, a dialog box will ask you whether a new window should be opened in JProfiler. This is the default setting.
    • Always new window
      Every time you profile a run configuration, a new window will be opened in JProfiler.
    • Reuse last window
      Every time you profile a run configuration, the last window will be reused in JProfiler.
  • You can ask JProfiler to always use interpreted mode for profiling. A separate checkbox tells JProfiler to use the deprecated JVMPI interface when profiling with a 1.5 JRE. Both these settings are trouble-shooting options and should normally not be selected.