是否可以判断Windows批处理文件中的JAVA_HOME
系统环境变量是否包含JDK?
You could look for %JAVA_HOME%\\bin\\javac.exe (or whatever it is, I assume exe). That should not exist in a JRE, only in the JDK.
If you're checking to see if the compiler exists, you could do something like:
if exist %JAVA_HOME%\bin\javac.exe (
...
) else (
...
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.