[Java programming language only]

Setting up a stand-alone development environment in Eclipse

Use Eclipse-based integrated development environment to build and run a Java™ SE application with the stand-alone version of WebSphere® eXtreme Scale.

Before you begin

Procedure

  • Configure Eclipse to build and run a Java SE application with WebSphere eXtreme Scale.
    1. Define a user library to allow your application to reference WebSphere eXtreme Scale application programming interfaces.
      1. In your Eclipse or IBM® Rational® Application Developer environment, click Window > Preferences.
      2. Expand the Java > Build Path branch and select User Libraries. Click New.
      3. Select the eXtreme Scale user library. Click Add JARs.
        1. Browse and select the objectgrid.jar or ogclient.jar files from the wxs_root/lib directory. Click OK. Select the ogclient.jar file if you are developing client applications or local, in-memory caches. If you are developing and testing eXtreme Scale servers, use the objectgrid.jar file.
        2. To include Javadoc for the ObjectGrid APIs, select the Javadoc location for the objectgrid.jar or ogclient.jar file that you added in the previous step. Click Edit.
      4. Click OK to apply the settings and close the Preferences window.
      The eXtreme Scale libraries are now in the build path for the project.
    2. Add the user library to your Java project.
      1. From the package explorer, right-click the project and select Properties.
      2. Select the Libraries tab.
      3. Click Add Library.
      4. Select User Library. Click Next.
      5. Select the eXtreme Scale user library that you configured earlier.
      6. Click OK to apply the changes and close the Properties window.
  • Run a Java SE application in Eclipse.
    Create a run configuration to run your application.
    1. Configure Eclipse to build and run a Java SE application with WebSphere eXtreme Scale.
      From the Run menu select Run Configurations.
    2. Right-click the Java Application category and select New.
    3. Select the new run configuration, named New_Configuration.
    4. Configure the profile.
      •  Project (on main tabbed page): your_project_name
      • Main Class (on main tabbed page): your_main_class
      • VM arguments (on arguments tabbed page): -Djava.endorsed.dirs=wxs_root/lib/endorsed

      Problems with the VM Arguments often occur because the path to java.endorsed.dirs must be an absolute path with no variables or shortcuts.

      Other common setup problems involve the Object Request Broker (ORB). You might see the following error. Refer to Configuring a custom Object Request Broker for more information:
      Caused by: java.lang.RuntimeException: The ORB that comes
      with the Sun Java implementation does not work with
      ObjectGrid at this time.
      If you do not have the objectGrid.xml or deployment.xml accessible to the application, you might see the following error:
      Exception in thread "P=211046:O=0:CT" com.ibm.websphere.objectgrid.
      				ObjectGridRuntimeException: Cannot start OG container at
      				Client.startTestServer(Client.java:161) at Client.
      				main(Client.java:82) Caused by: java.lang.IllegalArgumentException:
      				The objectGridXML must not be null	at com.ibm.websphere.objectgrid.
      				deployment.DeploymentPolicyFactory.createDeploymentPolicy
      			  (DeploymentPolicyFactory.java:55) at Client.startTestServer(Client.
      				java:154) .. 1 more
    5. Click Apply and close the window, or click Run.