@ECHO OFF
IF NOT DEFINED JAVA_HOME FOR /D %%I IN ("%ProgramFiles(x86)%\Java\jdk1.*" "%ProgramFiles%\Java\jdk1.*" "%ProgramW6432%\Java\jdk1.*") DO IF EXIST "%%I\jre\bin\server\jvm.dll" SET JAVA_HOME=%%I
ECHO SET JAVA_HOME=%JAVA_HOME%
IF NOT EXIST "%JAVA_HOME%\jre\bin\server\jvm.dll" (ECHO JAVA_HOME が正しくありません。& EXIT /B 1)
java -server -version 2>NUL || PATH %JAVA_HOME%\jre\bin;%PATH%
java -server -version 2>NUL || (ECHO JAVA_HOME が正しくありません。& EXIT /B 1)
