aboutsummaryrefslogtreecommitdiffstats
path: root/fop.bat
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-04-23 14:45:17 +0000
committerJeremias Maerki <jeremias@apache.org>2006-04-23 14:45:17 +0000
commitc10002fb0476f7e7625c26ea710491c525a5bdbd (patch)
tree78aee7015e11a38a1ee46b31b2777b416f4b5a40 /fop.bat
parent8592c9300848f27eebd40db3a2705c08705c725f (diff)
downloadxmlgraphics-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.bat12
1 files changed, 11 insertions, 1 deletions
diff --git a/fop.bat b/fop.bat
index c6b66fb60..357ffb4fd 100644
--- a/fop.bat
+++ b/fop.bat
@@ -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%