This tutorial explains how to build a new Eclipse workspace for the Waterken server with the server code integrated with the Subversion source control system.
The Waterken server uses the Joe-E verifier to ensure that it uses authority in a way that minimizes the risk of breach. This tutorial does not include how to install the Joe-E verifier plugin and to use it to examine your own code for dangerous uses of authority. It does cover installation of the Joe-E files because the Waterken server uses some Joe-E libraries internally.
Start Eclipse. Go to "File/Switch Workspace/Other". You may want to check "Copy Settings/WorkBench Layout" if you have a custom layout you like.
Eclipse will restart with an empty workspace. Click the right-most icon to go to the workspace view.
If you are working behind a firewall, you may need to configure the HTTP proxy in Eclipse. In Eclipse 3.2, go to "Window/Preferences/Install_Update" and configure the proxy hostname and port. Under Eclipse 3.3, go to "Window/Preferences/General/Network Connection".
Reboot Eclipse if you had to set a proxy.
The Subclipse development team has an excellent step by step description of installing their plugin at their site.
- Click "Help/software Updates/Find and Install.../Search" for new features to install. Click "Next".
- Click "New Remote Site". In the dialog, use name "Subclipse", URL
- Select the Subclipse plugin and its subcomponents (you do not need the Integrations subcomponent).
- Click ok to the rest of the stuff: the license agreement, the "Finish", the "Go Ahead Even though Nobody Put a Silly Signature on the Code" button.
- Reboot Eclipse.
Subversion has its own place to look for proxy settings. Now that you have
installed the plugin, the subversion software itself has been automagically
installed. It needs its proxy settings configured as well. Find the "servers"
file, in Windows XP it can be found in your
Data\Subversion folder. In Windows Vista, it's at
C:\users\username\AppData\Roaming\Subversion. In Linux, it
can be found in
In the servers file, go to
[global] section. Find the two lines (they show up in other
sections as well, do not set the wrong ones!),
# http-proxy-host = proxy2.some-domain-name.com # http-proxy-port = 9000
Remove the # at the beginning of the line, and put in the proxy info.
- Go to "Window/Open Perspective/ Other/ SVN Repository"
- Right-click in the "SVN Repos" tab, click "New", enter the Waterken server
<https://waterken.svn.sourceforge.net/svnroot/waterken/server/trunk/waterken>. Click "Next".
- Disregard the certificate warning, (i.e., click "ok, accept permanently").
- In the Subversion tab you should now have the waterken repository listed. This brings you to all the individual project folders.
- For each folder, right-click and choose "Checkout.../Checkout as a project
in the Workspace/Finish". Check them out in the following order (the order is
not important unless you try to do test-compiles during the checkout process,
the order is the order of compiler dependencies):
- At this point, you should have all the sources for the Waterken server installed. Switch from the Repository view to the Java view, and run "Project/Clean..." to ensure it all builds.
To update, in the Java view, select the folders you want to sync/update, right-click, choose "Team/Update". This makes all the setup effort worth it, right?
To run the server under Eclipse, you need to configure the Run or Debug
window. Click "Debug/Open Debug Window... Debug as a Java Application", "Name"
is "serve", "Main Project" is "remote", "Main Class" is
"org.waterken.server.Serve". Go to the "Arguments" tab, set "Working Directory"
to "Other", click "Variables", choose "workspace_loc". Press "Debug". You
should see server messages appearing in the Console. Open a browser on
to see the welcome message from the server.
Go into the remote folder and find the files
jars.bat. Run the one appropriate for your operating system. This will put
serve.jarin the main folder:
spawn.jaris used to create a new database, and
serve.jarallows you to run the server without running eclipse.
For non-local applications (and why would you want only-local applications?), you will need to produce a public/private key pair. In the genkey folder you will find another pair of files
jar.bat. Run the appropriate one. In the main folder you will now have
genkey.jar. Use this to generate a keypair for the server. If you are behind a firewall, you may need to configure the proxy settings so genkey can get out, if so the command line will look something like this:
java -DproxyHost=web-proxy.hpl.hp.com -DproxyPort=8088 -DproxySet=true -jar genkey.jar
Congratulations! You are now on your own.