Compiling Java Classes in LiveSite 3.0.2

20 January 2009
by Billy Czajkowska

Java classes created in TeamSite & LiveSite reference many other Java files.  These files are located in a different directory of TeamSite, so are referred to as external files to the location where Java classes.
The problem with compiling a Java class comes when the Java file to be compiled looks for these reference files, but can’t find them as they are located externally to where a Java compile takes place.  This is not documented.
Solution:
1. Make sure the Java file you create is in the location;
iw-home/local/config/lib/content_center/livesite_customer_src/src

Files created should be placed into these location corresponding to the file type
iw-home/local/config/lib/content_center/livesite_customer_src/etc/conf for config files
iw-home/local/config/lib/content_center/livesite_customer_src/etc/web for jsp files
2. you need to copy the external jar files which you may require for your own Java file located in;
iw-home/httpd/webapps/content_center/WEB-INF/lib
to
iw-home/local/config/lib/content_center/livesite_customer_src/lib

There are many Jar files which have many java classes which might be referenced in your own Java file.  Typical Jar files which are recommended to copy to the location above are;
– dom4j-1.6.1.jar
– livesite.jar
– livesite_customer.jar
– livesite-runtime.jar
3. Once  you have copied these files over, in command line, navigate to
iw-home/local/config/lib/content_center/livesite_customer_src
4. Run the command iw-home/bin/make_toolkit.ipl
This should now build your Java file successfully to the Java class you require for your LiveSite external component

Our Latest News