Configure an 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
Install the
WebSphere eXtreme Scale product
into a new or empty directory and apply the latest
WebSphere eXtreme Scale cumulative fix pack.
You can also use the
WebSphere eXtreme Scale trial
version by unzipping the zip file. For more information on installation,
see .
Procedure
- Configure Eclipse to build and run a Java SE application with WebSphere eXtreme Scale.
- Define a user library to allow your application to reference WebSphere eXtreme Scale application programming
interfaces.
- In your Eclipse or IBM® Rational® Application Developer
environment, click .
- Expand the branch and select User Libraries.
Click New.
- Select the eXtreme Scale user
library. Click Add JARs.
- 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.
- 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.
In the Javadoc location path box, type the following web address:
http://www.ibm.com/developerworks/wikis/extremescale/docs/api/
- Click OK to apply the settings and close
the Preferences window.
The eXtreme Scale libraries are now
in the build path for the project.
- Add the user library to your Java project.
- From the package explorer, right-click the project and select Properties.
- Select the Libraries tab.
- Click Add Library.
- Select User Library. Click Next.
- Select the eXtreme Scale user
library that you configured earlier.
- Click OK to apply the changes and close
the Properties window.
- Run a Java SE application
with eXtreme Scale with Eclipse. Create a run configuration
to execute your application.
- Configure Eclipse to build and run a Java SE application with eXtreme Scale. From the Run menu select Run
Configurations.
- Right-click the Java Application
category and select New.
- Select the new run configuration, named New_Configuration.
- 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
- Click Apply and close the window,
or click Run.