Using Eclipse and the dm Server tools, it is possible to run applications directly from the IDE. As changes are made to the application in the IDE, they can be automatically applied to the running application allowing for rapid feedback of changes in function.
Before the GreenPages application can be started from Eclipse, the projects need to be imported. To import the projects into Eclipse:
Open the Import Wizard using
→ .From the Import Wizard select Next:
→ and click
Click $GREENPAGES_HOME/solution
as the root directory.
In the Import Projects window, select all the projects and click Finish:
Validate that the imported projects appear in Package Explorer:
There may be compilation errors at this stage.
Projects for dm Server are associated with a dm Server runtime environment in Eclipse. This is to allow launching and testing from within Eclipse, and also to allow classpath construction in Eclipse to mirror the dynamic classpath in the dm Server runtime.
Compilation errors in the previous step will be resolved here.
To configure a dm Server runtime environment:
Open
→ → .In the Show View dialog choose → to make the servers view visible:
Right-click in the (empty) Servers view and select → .
In the New Server dialog, choose → and click Next.
Click $DMS_HOME
directory.
Click to complete creation of the server:
Close and reopen all projects. Select all projects in Package Explorer. Right-click on the projects and choose and then .
It is possible that there remain spurious build errors from Eclipse (see the Problems view), in which case a project clean build may clear the problems. Select → from the main menu, and choose to Clean all projects. This process is known as the “Eclipse dance”. It may be necessary to repeat this on a few projects.
Despite the dance steps outlined, there will remain a Warning like this:
It is safe to ignore this warning.
Now that GreenPages is successfully imported into Eclipse, the project can be run directly from within the IDE. Before doing so, remove a GreenPages PAR that may currently be deployed in dm Server.
To run GreenPages from within Eclipse:
Drag the
PAR project from the Package Explorer onto the dm Server node in the Servers window:
To start dm Server from within Eclipse right-click on the dm Server node in the Servers window and choose
.
Verify that GreenPages is installed correctly by checking for
<SPDE0010I> Deployment of 'greenpages' version '1' completed
in the Console window.