Description
Below steps may help you to setup run-time environment for JHSDK.
Solution
The steps outlined below, involve creation of a copy of one of the Harvest wrapper scripts from $HARVESTHOME/bin and adding necessary Java references towards the end of that file. Once this is done, you just need to "source" this file prior to using the JHSDK programs.
Ex:
- Install Harvest command line on the machine (follow steps in Harvest Install Guide)
- Install Harweb (follow steps in Harvest Install Guide)
- cd $HARVESTHOME
- grep -v exec $HARVESTHOME/bin/hco > $HARVESTHOME/.jhsdk.setup
- Edit $HARVESTHOME/.jhsdk.setup file in your favourite editor and append references to JAVA and CLASSPATH
JAVA_HOME=<location to Java SDK directory>; export JAVA_HOME PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH; export PATH CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$HARVESTHOME/lib:.:$CLASSPATH; export CLASSPATH
Note: Please adjust the above according to your necessity. The above are usually minimum required.
- Now save the file $HARVESTHOME/.jhsdk.setup
- chmod u+x $HARVESTHOME/.jhsdk.setup
- Source the file $HARVESTHOME/.jhsdk.setup
- If you are using the Bourne, Korn, or Bash shells, enter the following command:
$HARVESTHOME/.jhsdk.setup
- If you are using the C shell modify .jhsdk.setup file to make appropriate changes needed for C shell and then enter the following command:
source $HARVESTHOME/.jhsdk.setup
- Now follow the steps to use JHSDK Samples in Harvest Install Guide ? Chapter 7.15