You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Darren Munt <da...@ardex.com.au> on 2002/07/09 03:25:26 UTC
Problem running v0.20.4 from command line
WARNING: NON-Java-Savvy User
WARNING: Windows 2000 Developer
I'm having a problem running version 0.20.4 from the command line. I have been using v0.20.3 and the .fo file renders OK with this version.
When I use this command line:
c:\jdk\bin\java.exe -Xms64M -Xmx320M -cp lib\tools.jar;lib\classes.zip;c:\fopv20.4\fop.jar;c:\fopv20.4\lib\batik.jar;c:\fopv20.4\lib\xalan-2.3.1.jar;c:\fopv20.4\lib\xercesImpl-2.0.1.jar;c:\fopv20.4\lib\xml-apis.jar;c:\fopv20.4\lib\avalon-framework-cvs-20020315.jar;c:\fopv20.4\lib\logkit-1.0.jar;c:\fopv20.4\lib\jimi-1.0.jar -jar c:\fopv20.4\fop.jar -fo c:\dev\common\fopracebook.fo -pdf c:\dev\common\fop\racebook.pdf
I get the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
When I use this command line:
c:\jdk\bin\java.exe -Xms64M -Xmx320M -cp lib\tools.jar;lib\classes.zip;c:\fopv20.4\fop.jar;c:\fopv20.4\lib\batik.jar;c:\fopv20.4\lib\xalan-2.3.1.jar;c:\fopv20.4\lib\xercesImpl-2.0.1.jar;c:\fopv20.4\lib\xml-apis.jar;c:\fopv20.4\lib\avalon-framework-cvs-20020315.jar;c:\fopv20.4\lib\logkit-1.0.jar;c:\fopv20.4\lib\jimi-1.0.jar org.apache.fop.apps.Fop -fo c:\dev\common\fop\racebook.fo -pdf c:\dev\common\fop\racebook.pdf
I get this error:
[INFO] FOP 0.20.4
[INFO] building formatting object tree
[ERROR] Missing byte-order mark
I have basically copied the -cp parm straight from the fop.bat script, just adding the full path. Other than that, the only difference between this and the way I was calling v0.20.3 is that the FOP.bat does not use the -jar parm. I have tried it both ways as per above. I downloaded fop-0.20.4-bin.tar.gz.
All of the files in the -cp parm exist. I have moved fop.jar from /build to the root of my fop0.20.4 installation (for legacy code reasons). Any guidance would be appreciated.
RE: Problem running v0.20.4 from command line
Posted by Roland Neilands <rn...@pulsemining.com.au>.
> WARNING: NON-Java-Savvy User
I know all about that.
> WARNING: Windows 2000 Developer
My condolences ;)
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/avalon/framework/logger/Logger
My bet is you haven't updated your CLASSPATH environment variable.
Set the LIBDIR to your fop installation (& your fop.jar loc'n ?), save the
code below as fop.bat & run it instead. Should be a bit more user-friendly &
runnable from anywhere (easier still if you add it to the PATH : run
msconfig). Based on the runtests.bat.
@echo off
echo Running FOP
echo ----------------
if "%JAVA_HOME%" == "" goto error
set LIBDIR=C:\fop\fop-0.20.4\lib
set
LOCALCLASSPATH=%LIBDIR%\batik.jar;%LIBDIR%\xercesImpl-2.0.1.jar;%LIBDIR%\xal
an-2.3.1.jar;%LIBDIR%\xml-apis.jar;%LIBDIR%\avalon-framework-cvs-20020315.ja
r;%LIBDIR%\logkit-1.0.jar;%LIBDIR%\jimi-1.0.jar;%LIBDIR%\..\build\fop.jar
java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8
goto end
:error
echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.
:end
Regards,
Roland.