首页 > 编程语言 > 详细

Jabba -- Java JDK 版本管理工具

时间:2020-05-30 10:49:04      阅读:107      评论:0      收藏:0      [点我收藏+]

1.安装

参照官网:https://github.com/shyiko/jabba

window 10:powershell下执行

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-Expression (
Invoke-WebRequest https://github.com/shyiko/jabba/raw/master/install.ps1 -UseBasicParsing
).Content

问题1:

Invoke-WebRequest : 未能解析此远程名称: ‘raw.githubusercontent.com‘
所在位置 行:2 字符: 3
+ Invoke-WebRequest https://github.com/shyiko/jabba/raw/master/instal ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest],WebExce
ption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

解决:

1)打开IPAddress.com网站,输入raw.githubusercontent.com,查询出结果,如下:

Hostname Summary
Domain githubusercontent.com
IP Address
199.232.68.133
Web Server Location United States

2)在C:/Windows/System32/drivers/etc/hosts中添加

199.232.68.133 raw.githubusercontent.com

2.使用

常用命令可参照官网:https://github.com/shyiko/jabba

问题1:将系统中已安装的JDK链接到jabba中

jabba link system@1.8.171 C:\Program Files\Java\jdk1.8.0_171
C:\Program\bin\java.exe wasn‘t found. If you believe this is an error - please create a ticket at https://github.com/shyiko/jabba/issues (specify OS and command that was used)

解决:由于路径中有空格,将Program Files改为缩写Progra~1

jabba link system@1.8.171 C:\Progra~1\Java\jdk1.8.0_171

问题2:将系统中已安装的JDK链接到jabba中

jabba link system@1.8.171 C:\Progra~1\Java\jdk1.8.0_171
symlink C:\Progra~1\Java\jdk1.8.0_171 C:\Users\sanpingx\.jabba\jdk\system@1.8.171: A required privilege is not held by the client.

解决:权限不够,以管理员身份运行power shell

 

Jabba -- Java JDK 版本管理工具

原文:https://www.cnblogs.com/sanpingx/p/12991220.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!