问题如题,win10 安装jdk8,开机启动后报错,百度很多人遇到这个情况,没找到很好的答案,有的说安装路径空格,汉字之类的,还有环境变量配置错误,经排查这些都排除了,后来试着更改了一下主机名字,问题解决了,原来是主机名“DESKTOP-xxxxx”中的“-”搞得,修改主机名称以后,问题解决了;一大早起来折腾了半天就解决了这么个问题,不过以后每次开机再也不用看到令人烦躁的警告了,想想也不错o(* ̄︶ ̄*)o
java.lang.IllegalArgumentException: Invalid characters in hostname
at java.net.HostPortrange.toLowerCase(Unknown Source)
at java.net.HostPortrange.(Unknown Source)
at java.net.URLPermission$Authority.(Unknown Source)
at java.net.URLPermission.parseURI(Unknown Source)
at java.net.URLPermission.init(Unknown Source)
at java.net.URLPermission.(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getContentType(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.retrieveContentOfPACFile(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.contructLegacyPACScript_16(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.SunAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)