openCRX 2.0 SDK for Eclipse Step-by-Step Guide
This guide explains how to setup openCRX 2.0 SDK for Eclipse. IMPORTANT: This guide assumes that openCRX 2.0 SDK project is successfully setup as described in the openCRX 2.0 SDK for Ant Step-by-Step and openCRX 2.0 SDK on Tomcat/LWC Step-by-Step guides. Make sure that you have installed Eclipse 3.2 or higher (download it from here and the Sysdeo Eclipse Tomcat Launcher plugin (download it from here). After installation launch Eclipse. Create a new workspace by selecting File > Switch Workspace > Other. Enter the directory name of the new workspace. In this guide we will use the directory .\SF\eclipse\openmdx-example-workshop as shown below:
Eclipse will be launched with a new empty workspace.
Close the Welcome page. Open the preferences dialog with Window > Preferences. Navigate to the entry Java > Installed JREs. Because the openCRX requires a JDK 1.5 we first have to add a JDK 1.5 compliant JRE. Click on Add and then enter JRE 5.0 as JRE name and select the home directory of an installed JDK 1.5. Eclipse automatically completes the other fields of the dialog as shown below:
Select the newly added JRE 5.0 as default JDK.
Next we will import the openCRX SDK projects. Select File > Import.
Select Existing Projects into Workspace.
Navigate to the openCRX 2.0 SDK installation directory. In our case this is C:\temp\SF\opencrxSdk-2.0.0\opencrx-2.0.0. Eclipse recursively scans all directories. As a result it should present a list of projects as shown below:
Deselect the following projects
- openCRX 2 ~ Core
- openCRX 2 ~ Groupware
- openCRX 2 ~ Store
- openMDX 2 ~ Core
- openMDX 2 ~ Security
- openMDX 2 ~ Portal
- openMDX 2 Platform ~ IBM WebSphere 5
- openMDX 2 Thirdparty ~ Java2 Extension (jre-1.3)
The package explorer view now lists the projects shown below:
Next we import the openMDX/Core project. Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\opt\openmdx-2.0.0\jre-1.5\core and click Finish.
Next we do the same with the project openMDX/Portal. Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\opt\openmdx-2.0.0\jre-1.5\portal and click Finish.
Next we do the same with the project openMDX/Security. Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\opt\openmdx-2.0.0\jre-1.5\security and click Finish.
And now we are ready to import the openCRX projects:
Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\core and click Finish.
Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\groupware and click Finish.
Open the import dialog with File > Import > Existing Projects into Workspace. Navigate to the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\store and click Finish.
Next we have to fix some project settings for the following projects
- openCRX 2 ~ Core
- openCRX 2 ~ Groupware
- openCRX 2 ~ Store
Go to the entry Java Build Path and remove the projects openMDX 2 ~ Core, openMDX 2 ~ Portal and openMDX 2 ~ Security:
Then click on Add and add the projects openMDX 2 (2.0.0) ~ Core, openMDX 2 (2.0.0 ~ Portal, openMDX 2 (2.0.0) ~ Security:
The Java Build Path should then look like this:
Now go to the entry Java Compiler and set the Compiler compliance level to 5.0:
Next we have to configure Tomcat. Open the preferences dialog with Window > Preferences and navigate to the entry Tomcat. Set the version to Tomcat 6.x and the Tomcat Home to .\openmdxTomcatLwc-2.0.0\apache-tomcat-6.
In the tab Advanced select all projects.
In the tab JVM Settings do the following:
- Set JRE 5.0 in the JRE drop-down
- Add the JVM parameter -Xmx400M
- Add the JVM parameter -Djava.protocol.handler.pkgs=org.openmdx.kernel.url.protocol
In the tab Source Path select Automatically Compute Source Path.
Then go back to the tab JVM Settings and click Create Start Configuration. This creates an Eclipse launch file which allows to launch Tomcat 6 with the settings we have made.
Before we can launch Tomcat we first have to complete the classpath of the Tomcat 6.x launch file. Open the Run dialog with Run > Open Run Dialog.
Select the launch file for Tomcat 6.x, select the tab Classpath and navigate to User Entries. Then click on Add External JARs.
Navigate to the directory .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\lib and select all JARs in this directory as shown below.
The selected JARs are added to the User Entries.
Finally you can start Tomcat. Open the Run dialog with Run > Open Run Dialog. Select Tomcat 6.x and click Run. The console output should look as shown below. Compare your output with this sample output.
Congratulations
Congratulations! You have successfully prepared openCRX 2.0 SDK for Eclipse.
Version 56.1 last modified by superadmin on 20/08/2008 at 03:42
Comments: 0