JCopist has been successfully tested with the following configurations:
The Java Runtime Environment is not included in the JCopist distribution, you will need to install it separately.
(You can download it here).
In the rest of this guide, the base Java installation directory (that is, the directory containing bin) will be referred to as JAVA_HOME.
OpenOffice.org is not included in the JCopist distribution, you will need to install it separately. (You can download it here).
In the rest of this guide, the base OpenOffice.org installation directory (that is, the directory containing program) will be referred to as OFFICE_HOME.
Warning: do not use OpenOffice.org version 2.0.2, as it contains a bug that will prevent JCopist from functionning.
Apache Tomcat is not included in the JCopist distribution, you will need to install it separately. (You can download it here).
In the rest of this guide, the base Tomcat installation directory (that is, the directory containing bin) will be referred to as CATALINA_HOME.
If you test JCopist with a different configuration, please let us know on the project's forum.
Create a base directory for the JCopist binaries. It will be referred to as JCOPIST_HOME.
Copy the following directories from the binary RMI distribution to JCOPIST_HOME:
Edit the file JCOPIST_HOME/bin/startup.sh (or startup.cmd for Windows) and change the variables called JCOPIST_HOME and OFFICE_HOME according to your environment.
Edit the file JCOPIST_HOME/bin/startup.sh (or startup.cmd for Windows) and change the variable called JCOPIST_HOME according to your environment.
Adapt the configuration files in JCOPIST_HOME/conf to your needs. For more information, see the configuration guide.
The binary Web Services distribution contains:
To install the Web Services version, you must deploy the webapp in your servlet container. With Apache Tomcat, this is achieved by copying the WAR file to CATALINA_HOME/webapps (the context name is based on the WAR file name, so rename the file if you want a shorter context name).
You have to add 4 JAR files from the OpenOffice.org distribution in your webapp's classpath:
The classpath MUST refer directly to these files, you can not use a copy of the JARs (this causes a java.lang.UnsatisfiedLinkError at webapp deployment, we have no explanation for this). The only way we have found is to modify the Tomcat classpath directly.
For instance, for a Windows installation, edit $CATALINA_HOME/bin/setclasspath.bat and add the last 4 red lines:
[...] rem Set standard CLASSPATH rem Note that there are no quotes as we do not want to introduce random rem quotes into the CLASSPATH set CLASSPATH=%JAVA_HOME%\lib\tools.jar
set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 2.0\program\classes\juh.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 2.0\program\classes\jurt.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 2.0\program\classes\ridl.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 2.0\program\classes\unoil.jar
set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 3\URE\java\juh.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 3\URE\java\jurt.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 3\URE\java\ridl.jar set CLASSPATH=%CLASSPATH%;C:\Program Files\OpenOffice.org 3\Basis\program\classes\unoil.jar
JCopist uses the file system to store templates, server state and temporary files. All directories must be created before the server starts.
The base work directory is defined in the jcopist.xml configuration file provided with the distribution.
The <workDir> tag at the beginning of this file will be referred to as JCOPIST_WORK.
The default directory structure is the following:
In case you want to change the directory structure itself, each sub-directory is defined in a tag in the rest of the configuration file.
For instance, the following base directory will work:
c:\mytools\jcopist\workdirectory <-------- 32 characters ------->
... while the following won't:
c:\mytools\jcopist\work_directory <-------- 33 characters -------->
Apparently, the limit in Linux is higher. We haven't determined the maximum allowed size.
[...] <converterManager> <socket>true</socket> <socketHost>localhost</socketHost> <socketPort>8100</socketPort> [...] </converterManager>
C:\Program Files\OpenOffice.org 2.X\program > soffice.bin -headless -display :99 -accept="socket,host=localhost,port=8100,name=test;urp;StarOffice.NamingService" -nofirststartwizard
C:\Program Files\OpenOffice.org 3\program > soffice.exe -headless -display :99 -accept="socket,host=localhost,port=8100,name=test;urp;StarOffice.NamingService" -nofirststartwizard
$ /usr/X11R6/bin/Xvfb -screen scrn2 800x600x16 :99 &
JCopist launches multiple OpenOffice.org instances to parallelize document conversions.
Normally, a system user can only run one instance at a time. In order to overcome this limitation, JCopist "simulates" multiple users by dynamically changing the "user name" and "user home directory" system properties when the OpenOffice.org processes are launched.
However, before OpenOffice.org can be launched (even in silent mode), the user must have accepted the license. Therefore, we use a "reference" home directory of a user who has accepted the license. When dynamic users are created, this directory is copied to their home directory.
You have to complete the license agreement procedure for your OpenOffice.org installation. Therefore, we cannot provide the reference home directory with the JCopist distribution. You have to create it with the following procedure:
C:\jcopist\ooProfiles> set USERNAME=reference C:\jcopist\ooProfiles> set USERPROFILE=c:\jcopist\ooProfiles\reference
$ export USER=reference $ export HOME=/opt/jcopist/ooProfiles/reference
$ soffice
You will be presented with OpenOffice.org's license agreement window:
reference +-- Application Data +-- OpenOffice.org2 +-- user +-- registry +-- data +-- org +-- openoffice +-- Setup.xcu
reference +-- .openoffice.org2 +-- user +-- registry +-- data +-- org +-- openoffice +-- Setup.xcu
JCopist is now installed.
Before lauching the server, have a look at the configuration guide.