This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
:: ------------------------------------------------------------------ | |
:: JavaHome.bat - search for and set JAVA_HOME | |
:: 1. If JAVA_HOME is set in system environment, do nothing else. | |
:: 2. If javahome.txt already exists, use that value | |
:: 3. If those fail, search parent directories for java.exe | |
:: 4. Finally, try looking in the registry for other Java installations | |
:: Note- Script does not add trailing slash to JAVA_HOME variable | |
:: Note- JBINARY var can be set to JRE or JDK detection | |
:: ------------------------------------------------------------------ |