1 Star 0 Fork 0

amusement1234/JEnv-for-Windows

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jenv.bat 1015 Bytes
一键复制 编辑 原始数据 按行查看 历史
@echo off
rem # Check if powershell is in path
where /q pwsh
IF ERRORLEVEL 1 (
where /q powershell
IF ERRORLEVEL 1 (
echo Neither pwsh.exe nor powershell.exe was found in your path.
echo Please install powershell it is required
exit /B
) ELSE (
set ps=powershell
)
) ELSE (
set ps=pwsh
)
rem ps is the installed powershell
%ps% -executionpolicy remotesigned -File "%~dp0/src/jenv.ps1" %* --output
if exist jenv.home.tmp (
FOR /F "tokens=* delims=" %%x in (jenv.home.tmp) DO (
set JAVA_HOME=%%x
)
del -f jenv.home.tmp
)
if exist jenv.path.tmp (
FOR /F "tokens=* delims=" %%x in (jenv.path.tmp) DO (
set path=%%x
)
del -f jenv.path.tmp
)
if exist jenv.use.tmp (
FOR /F "tokens=* delims=" %%x in (jenv.use.tmp) DO (
if "%%x" == "remove" (
set "JENVUSE="
) ELSE (
set JENVUSE=%%x
)
)
del -f jenv.use.tmp
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/amusement1234/JEnv-for-Windows.git
git@gitee.com:amusement1234/JEnv-for-Windows.git
amusement1234
JEnv-for-Windows
JEnv-for-Windows
main

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385