Skip to content

Commit

Permalink
Merge pull request #65 from Jentsch/RemovingJavacInBAT
Browse files Browse the repository at this point in the history
Removing JavaC dependency in *.bat
  • Loading branch information
jsuereth committed Nov 7, 2013
2 parents 03e56ec + 7a8f512 commit 20180ea
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@REM @@APP_NAME@@ launcher script
@REM
@REM Envioronment:
@REM Environment:
@REM JAVA_HOME - location of a JDK home dir (optional if java on path)
@REM CFG_OPTS - JVM options (optional)
@REM Configuration:
Expand Down Expand Up @@ -45,22 +45,9 @@ for /F %%j in ('"%_JAVACMD%" -version 2^>^&1') do (
if %%~j==Java set JAVAINSTALLED=1
)

rem Detect the same thing about javac
if "%_JAVACCMD%"=="" (
if not "%JAVA_HOME%"=="" (
if exist "%JAVA_HOME%\bin\javac.exe" set "_JAVACCMD=%JAVA_HOME%\bin\javac.exe"
)
)
if "%_JAVACCMD%"=="" set _JAVACCMD=javac
for /F %%j in ('"%_JAVACCMD%" -version 2^>^&1') do (
if %%~j==javac set JAVACINSTALLED=1
)

rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style
set JAVAOK=true
if not defined JAVAINSTALLED set JAVAOK=false
rem TODO - JAVAC is an optional requirement.
if not defined JAVACINSTALLED set JAVAOK=false

if "%JAVAOK%"=="false" (
echo.
Expand Down

0 comments on commit 20180ea

Please sign in to comment.