From: Jeremias Maerki Date: Sun, 23 Apr 2006 14:45:17 +0000 (+0000) Subject: Use JAVA_HOME environment variable if it is available. X-Git-Tag: fop-0_93~269 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c10002fb0476f7e7625c26ea710491c525a5bdbd;p=xmlgraphics-fop.git 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 --- 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%