Sun N1 Grid Engine 6.1 User's Guide

ProcedureHow to Use DRMAA with NetBeans 5.x

To use the DRMAA classses with your NetBeans 5.0 or 5.5 project, follow these steps:

  1. Click mouse button 3 on the project node and select Properties.

  2. Determine whether your project generates a build file or uses an existing file.

    • If your project uses a generated build file:

      1. Select Libraries in the left column.

      2. Click Add Library.

      3. Click Manage Libraries in the Libraries dialog box.

      4. Click New Library in the Library Management dialog box.

      5. Type DRMAA in the Library Name field in the New Library dialog box.

      6. Click OK to dismiss the New Library dialog box.

      7. Click Add JAR/Folder.

      8. Browse to the sge-root/lib directory in the file chooser dialog box and select the drmaa.jar file.

      9. Click Add JAR/Folder to dismiss the file chooser dialog box.

      10. Click OK to dismiss the Library Management dialog box.

      11. Select the DRMAA library and click Add Library to dismiss the Libraries dialog box.

    • If your project uses an existing build file:

      1. Select Java Sources Classpath in the left column.

      2. Click Add JAR/Folder.

      3. Browse to the sge-root/lib directory in the file chooser dialog box and select the drmaa.jar file.

      4. Click Choose to dismiss the file chooser dialog box.

  3. Click OK to dismiss the properties dialog box.

  4. Verify that the DRMAA shared library is in the library search path.

    To run your application from NetBeans, the DRMAA shared library file sge-root/lib/arch/libdrmaa.so must be included in the library search path (LD_LIBRARY_PATH on the Solaris Operating Environment and Linux). The sge-root/lib/arch directory is not included automatically when you set your environment using the settings.sh or settings.csh files.To set up the path for the shared library, perform one of the following:

    • Set up your environment in the shell before launching NetBeans.

    • Add to the netbeans-root/etc/netbeans.conf file to set up the environment, such as:

      # Setup environment for SGE
      . <sge-root>/<sge_cell>/common/settings.sh
      ARCH=`$SGE_ROOT/util/arch`
      LD_LIBRARY_PATH=$SGE_ROOT/lib/$ARCH; export LD_LIBRARY_PATH