My shell script is as below:

#!/bin/sh
JAVA_HOME=/usr/java
export JAVA_HOME
DirCur=/tmp/tuan/Process
Book=mybook
PubStyle=PG
cd /apps/fop-0.93
LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
LOGFILE1=-Dlog4j.configuration=file:conf/log4j.xsl.properties
LOGFILE2=-Dlog4j.configuration=file:conf/log4j.pdf.properties
LOCAL_FOP_HOME=/apps/fop-0.93
LIBDIR=$LOCAL_FOP_HOME/lib
LOCALCLASSPATH=$LOCAL_FOP_HOME/build/fop.jar
LOCALCLASSPATH="$LOCALCLASSPATH;$LOCAL_FOP_HOME/build/fop-sandbox.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/xml-apis-1.3.02.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/xercesImpl-2.7.1.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/xalan-2.7.0.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/serializer-2.7.0.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/batik-all-1.6.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/xmlgraphics-commons-1.1.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/avalon-framework-4.2.0.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/commons-io-1.1.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/commons-logging-1.0.4.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/jimi-1.0.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/jai_core.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/jai_codec.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/fop-hyph.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/saxon8.jar"
LOCALCLASSPATH="$LOCALCLASSPATH;$LIBDIR/log4j-1.2.14.jar"

FOP_CMD_LINE_ARGS="-xml $DirCur/Fragments/$Book.xml"
FOP_CMD_LINE_ARGS="$FOP_CMD_LINE_ARGS -xsl $DirCur/Support/cadets_assembly.xsl"
FOP_CMD_LINE_ARGS="$FOP_CMD_LINE_ARGS -param g-book-path $DirCur/Fragments/"
FOP_CMD_LINE_ARGS="$FOP_CMD_LINE_ARGS -foout $DirCur/Fragments/$Book.tmp"
java -Xms128M -Xmx512M -cp "$LOCALCLASSPATH" 
-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl 
org.apache.fop.cli.Main $FOP_CMD_LINE_ARGS
if [ -s "$DirCur/Fragments\$Book.tmp" ]
then
   echo "built book assembly."
else
   echo "Could not build book assembly."
   exit
fi



thanks.

 



________________________________
From: Andreas Delmelle <[email protected]>
To: [email protected]
Sent: Monday, January 19, 2009 1:41:48 PM
Subject: Re: Exception in org/apache/fop/cli/Main

On 19 Jan 2009, at 21:26, Tuan Quan wrote:

Hi

> thanks, Andreas,
> i downloaded from 
> http://mirror.csclub.uwaterloo.ca/apache/xmlgraphics/fop/binaries/
> fop-0.94-bin-jdk1.4.tar.gz
> and used on my Sparc's Solaris 9 system.
> do i need to compile?

No. You downloaded the binaries, so you already have the compiled classes in a 
fop.jar.
(BTW: FOP 0.95 is also available, if you want to use the latest)

How do you run FOP exactly? If you use the 'fop' shell script in the 
distribution, this should normally add 'fop.jar' automatically to the classpath.

One possible cause: if you don't have a FOP_HOME environment variable set, then 
executing the shell script from another directory than the shell script's 
location could lead to 'fop.jar' not being added to the classpath. FOP_HOME is 
then set to the directory from where the script is run, and 
$FOP_HOME/build/fop.jar will not be found.


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to