Summary: Setting up your IDE to Work With GigaSpaces
Follow these steps to prepare your development environment:
Ensure you have a JDK installed - preferably version 1.5 or higher.
Expand detailed instructions...
Checking your JDK version
To check your installed Java version:
Open a command line window.
Run java -version
A response similar to this suggests you have a JDK installed:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)
It's also a good practice to set the JAVA_HOME environment variable. This will allow GigaSpaces XAP to easily detect your local Java installation and make sure that everything runs properly.
To verify that you have the Java home environment variable type the following in a command / shell window: Windows:
set JAVA_HOME
.
If the variable is set, you should see the path to the local java installation similar to the below:
JAVA_HOME=c:\Java\jdk1.5.0_12
Unix:
echo $JAVA_HOME
If the variable is set, you should see the path to the local java installation similar to the below:
/opt/java/jdk1.5.0_12
If you don't have the vairiable set, it highly recommended to set it. In windows XP, this is done as follows:
Start Menu -> Control Panel -> System -> Advanced tab -> Environment Variables -> System variables -> New.
In the "New System Variable" dialog box type "JAVA_HOME" for variable name and the path to your local java installation in the variable value. Click OK on all open dialogs to confirm. Note that you need to restart the command window if you want the variable to appear in it.
In unix, you need to add the following to your startup script (.bashrc for example):
export JAVA_HOME=/opt/java/jdk1.5.0_12
Alternatively, you can modify the setenv.(sh/bat) script under the bin directory in the GigaSpaces installation root.
If your installed JDK version is lower then 1.5 or none is installed, see below on how to install one.
Download and unzip the GigaSpaces XAP 6.6 zip file from the downloads page.
blank-line
If you don't have an IDE installed, you can download and unzip the Eclipse IDE for Java Developers to a directory without spaces from the Eclipse download page.
blank-line
(The next two steps are not mandatory if you only want to run the tutorial samples).
blank-line
Add the Spring IDE plugin to your IDE from the plugin update site: (paste this URL http://springide.org/updatesite in your update site list).
Expand detailed instructions...
Adding the Spring IDE plugin to your IDE
Eclipse
The following steps add the Spring IDE update site to Eclipse site list, and download the Spring IDE plugin from the site:
Start Eclipse
Select Help > Software Updates > Find and Install... to open the Install/Update dialog
Select Search for new features to install, and click Next
Click the New Remote Site... button on the upper right
Click OK (This adds the Spring IDE update site to the site list)
In the site list, mark only the Spring IDE site
Click Finished to start searching for the plugin
Select a mirror site near your location (or any), and click Next to start a search
Mark Spring IDE from the feature result list, and click Next
Accept the terms and click Next
Click Finish to install
To ensure that everything worked, select Help > About Eclipse Platform. A green Spring IDE icon should be added to the icon row.
Hide details
Optional - If you're not connected to the internet during development, and want code completion, configure your IDE for XML auto-complete when off-line.
Expand detailed instructions...
Adding OpenSpaces XML support to your IDE
Eclipse
The following steps add auto-complete support to your XML editor for the GigaSpaces module:
In Eclipse, select Window > Preferences... to open the Preferences window
On the right side of the window, select Web and XML > XML Catalog
Click the Add.. button, to open the Add/XML catalog entry dialog
In the Location field, click the folder icon and select File System...
Browse to <Your GigaSpaces Installed root folder>\lib\openspaces\schema folder
Select one of the xsd files
Set the Key Type field to Schema Location
Click OK to add the entry
Add all 9 xsd files the same way
Hide details
Your development environment is now ready to use GigaSpaces!