Previous Next         Current Page: NeXtMidas User's Guide / Third-Party Compatibility / Profilers / JProbe
FAQs   
Release Information   
Getting Help   
Basic Concepts   
Result Parameters   
XML Support   
Files   
System Operation   
Macros   
Applets and WebStart   
Graphics   
X-Midas Interoperability   
Third-Party Compatibility   
   - Apache   
   + Web Browsers   
   + WebStart   
   - Profilers   
      - NetBeans Profiler   
      - JProbe   
   - NetBeans   
   - JBuilder   
   - Intel Fortran Compiler   
   - Swig   
Installation and Customization   
Glossary   





Using JProbe with NeXtMidas

WARNING: Please see Profilers for important notes about using profilers with NeXtMidas.

Initial Configuration

The following steps will explain how to configure JProbe to work with NeXtMidas.

  1. Open a new terminal window and run the following:
    $ setenv NM_USER_JVM_FLAGS "-DNONATIVE=TRUE -DNOEXTERNAL=TRUE"
    $ nmstart
    This will set the configuration variables for NeXtMidas and create the Save File that will be used.
  2. Start JProbe (in this example it is the test-coverage module of JProbe that will be used, but the configuration, once set, should work with the other JProbe modules). Do this by running:
    $ $JPROBE/bin/jpcoverage
    (Note: $JPROBE is the installation directory of JProbe, often /opt/JProbe_Suite_5.2.0)

    The first thing that comes up should be the "Welcome to JProbe Coverage" window.
  3. In the "Welcome to JProbe Coverage" window click the "Acquire..." button. This will bring up the "JProbe LaunchPad" window. (Note: Unlike the above image your image will not have "nxm" listed yet.)
  4. In the "JProbe LaunchPad" window click the "Manage Configurations..." button. This will bring up the "Manage J2SE Configurations" window (note: make sure it says "J2SE" and not "J2EE").
  5. In the "Manage J2SE Configurations" window click the "Add..." button to add a new configuration names "nxm".
  6. In the "Create J2SE Configuration" window enter the following (it will be necessary to click the "..." button to edit the "Classpath" and "Java Options" fields):
    Property NeXtMidas 2.0.0 and Earlier NeXtMidas 2.1.0 and Later
    Configuration Name nxm nxm
    Main Class nxm.sys.lib.Shell NmClassLoader
    Working Directory Your Home Directory Your Home Directory
    Arguments Leave Blank Leave Blank
    Classpath ${NM_CP} ${NM_CP}/tools
    JVM Your_Java_Home/bin/java Your_Java_Home/bin/java
    Java Options -Djavahome=${JAVAHOME}
    -DJAVAHOME=${JAVAHOME}/
    -DNMROOT=${NMROOT}/
    -DNMPID=${NM_PID}
    -DNMSF=${NM_SF}
    -Djavahome=${JAVAHOME}
    -DJAVAHOME=${JAVAHOME}/
    -DNMROOT=${NMROOT}/
    -DNMPID=${NM_PID}
    -DNMSF=${NM_SF}
    -DSHELL=nxm.sys.lib.Shell
    When you are done it should look similar to the following:
  7. Click "OK" in both the "Create J2SE Configuration," "Manage J2SE Configurations," and the "JProbe LaunchPad" windows.
  8. In the "JProbe Coverage" window select "Session" and then "Save Settings" to save the settings. (It is suggested that you save the settings in your home directory in a file named "nxm.jpl".)
  9. In the "JProbe Coverage" window select "Session" and then "Exit" to exit JProbe.

Running

After configuring JProbe, running it is rather simple:

  1. Open a new shell and run the following to load the NeXtMidas parameters and initialize the save file.
    $ setenv NM_USER_JVM_FLAGS "-DNONATIVE=TRUE -DNOEXTERNAL=TRUE"
    $ nmstart
    Note: Setting -DNONATIVE=TRUE disables using native code for automatic conversions but makes debugging easier. Setting -DNOEXTERNAL=TRUE prevents the shell from exiting when an OS command is run (or a command is mistyped).
  2. Run the JProbe application:
    jpmemorydebugger Debugs memory usage.
    jpprofiler Profiles the code.
    jpcoverage Determines which lines of code the test cases cover.
    etc.  
  3. Run nmend to clean out the NeXtMidas parameters and delete the save file.