Eclipse setup
Follow these steps to prepare your development environment:
- Ensure you have a JDK installed - you will need version 1.6 or higher, latest Java 1.6 is recommended.
Checking your JDK version
To check your installed Java version:
- Open a command line window.
- Run
set JAVA_HOME
` - A response similar to this suggests you have a JDK installed:
JAVA_HOME=C:\jdk1.6
To check the JDK version, run %JAVA_HOME%\bin\java \-version
. A response like this from Java
indicates you have a valid JDK installed:
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
If your installed JDK version is lower then 1.5 or none is installed, see below on how to install one.
Installing a proper JDK (Java Development Kit)
- To install JDK 1.6, download and install JDK 6 Update X
Download and unzip the latest XAP release from the downloads page.
Install a Java IDE: If you don’t have an IDE installed, you can download and unzip the Eclipse IDE for Java Developers, or the IntelliJ IDEA IDE (we recommend the Ultimate Edition because of its excellent Spring framework support). If you’re using Eclipse, it is also recommended to install the Spring Tool Suite plugin for Eclipse.
Steps to run the application inside Eclipse IDE
- Start Eclipse. A Workspace Launcher Dialog appears.
- Write a new workspace name or select one of your existing workspaces, and click the OK button.
- To import the project, select File > Import … to open the import dialog
- Select Existing projects into workspace* and click *Next to open the import project dialog
- In the Select root directory* field click the *Browse button to open the browse dialog
- Select the folder
/examples/helloworld
and click OK - Make sure all 3 projects are selected: hello-common, hello-processor and hello-feeder
- Click Finish
Create a new Eclipse environment variable called GS_HOME, and point it to your GigaSpaces installation Root folder
Right Click on the hello-common project in the Package Explorer tab to open the context menu
Select Build Path > Configure Build Path… to open the Java Build Path dialog
Select the Libraries tab* and click the *Add Variable… button to open the New Variable Classpath Entry dialog
Click the Configure Variables… button to open the Classpath Variables dialog
Click the New… button to open the New Variable Entry dialog
In the Name field write
GS_HOME
to name the variableClick the Folder… button and browse to your GigaSpaces installation root folder
Select your GigaSpaces installation root folder and click OK
Click OK and OK again
Click Yes to do full rebuild
Close remaining dialogs