diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-04-23 14:45:17 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-04-23 14:45:17 +0000 |
commit | c10002fb0476f7e7625c26ea710491c525a5bdbd (patch) | |
tree | 78aee7015e11a38a1ee46b31b2777b416f4b5a40 /fop.bat | |
parent | 8592c9300848f27eebd40db3a2705c08705c725f (diff) | |
download | xmlgraphics-fop-c10002fb0476f7e7625c26ea710491c525a5bdbd.tar.gz xmlgraphics-fop-c10002fb0476f7e7625c26ea710491c525a5bdbd.zip |
Use JAVA_HOME environment variable if it is available.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@396279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop.bat')
-rw-r--r-- | fop.bat | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -56,5 +56,15 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%
-java %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+if "%JAVACMD%" == "" set JAVACMD=%JAVA_HOME%\bin\java
+goto runFop
+
+:noJavaHome
+if "%JAVACMD%" == "" set JAVACMD=java
+
+:runFop
+ECHO "%JAVACMD%"
+"%JAVACMD%" %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
|