Installation Guide
Download the latest Java Development Kit from http://java.sun.com/downloads/ (e.g., J2SE:JDK 5.0 Update 6). Unzip to a folder (e.g., C:\Program files\Java).
Download the latest version of Eclipse. Unzip to a folder (e.g., C:\Program files\Ecplipse), and Eclipse is ready to use; just start eclipse.exe from the folder.
Read the installation instructions found here to see how Subclipse is installed from within Eclipse. Subclipse is a plugin that adds Subversion integration to Eclipse.
Open Control Panel:Performance and Maintenance:System:Advanced to create a new system environment variable called JAVA_HOME. Set the value of this variable to the directory where you unzipped JDK (e.g. C:\Program Files\Java\jdk1.5.0_08). Add the following to the beginning of the PATH environment variable; %JAVA_HOME%\bin;
Restart your computer.
Open Eclipse and set "text file encoding" to be "UTF-8" in preferences (Window:Preferences:General:Editors). This ensures that Japanese signs are handled.
Download jdrive.2006-07-06.zip, see attached files below. Unzip the contents to c:\jdrive.2006-08-23\
Download edmdbserver.2006-08-23.zip, see attached files below. Unzip the contents to C:\jdrive.2006-08-23\edmdbserver\
Create a file called jdrive.bat, put this in your startup folder (C:\Documents and Settings\"your username"\Start Menu\Programs\Startup). Edit the file so that it contains the line "subst j: c:\jdrive.2006-08-23"
Run jdrive.bat to get J: mapped. Create a J:\temp catalogue.
Edit the EDM_BINARY_PATH variable in J:\startup.cmd to reflect the new database (set EDM_BINARY_PATH=J:\edmdbserver\edm4.7.057\bin).
Edit the JAVA_HOME variable J:\startup.cmd to reflect the JDK version you installed (e.g. set JAVA_HOME=c:\Program Files\Java\jdk1.5.0_08).
Start the Tomcat servlet engine by running startup.cmd.
In Eclipse, choose File:Import: and select "Other:Checkout Projects from SVN" and then "Create a new repository location". The url for the new location should be " http://ifd.byggforsk.no/svn/repos/". Select trunk/ifdws. Import this. Give the project a name (for example: ifdws), and find a location for check out (for example: C:\Projects\ifdws).
Open the Ant window(Window:Show View:Ant), which is used for building the application. Drag and drop build.xml to the Ant window. Before building, make sure that the file ifdbrowser:webapp_ifdbrowser:web_INF/web.xml contains the following value for param barbi WSEndpoint (edit if necessary); value test.barbi.no/services/ifdRPC_1.1
Double-click on "all" in the Ant window to compile. Hopefully everything compiles successfully.
Java Documentation Style
TODO
Debugging
It is possible to debug while using the browser. This link explains how Tomcat needs to be set up. The easiest to do is to replace the following line in catalina.bat located on the J: drive
set DEBUG_OPTS=
with
rem set DEBUG_OPTS=
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Restart Tomcat with this, then start debugging in Eclipse as explained in the link (create a Remote Java Application debugging configuration, using default settings). Try it by setting a breakpoint in the search method of SearchAction?.java, then see that you can step into the code from here when you perform a search in the browser.
Debugging in Eclipse
Starting with the J: drive that contained edm v4.7.055, Java test programs resulted in an "edom3_java_client.dll not found" error while debugging. To get rid of this error, select Debug As:Debug... Select Arguments in the pop-up window, and uncheck "Use default working directory". Set the working directory to J:\edmdbserver\edm4.7.055\bin
Japanese Characters
Does your browser display Japanese characters as square boxes? Follow the instructions on the bottom of this page to install a required Windows font.
Further Reading
- IFD Documentation, see attached files
- Introduction to servlets, beans, JSP, ...
- Struts Action Framework
- JSP syntax
- Reference for writing Javadoc comments
- Axis
