简体   繁体   English

如何在代理后面安装 Eclipse Neon

[英]How to install Eclipse Neon behind a proxy

With Neon, Eclipse comes with an installer.在 Neon 中,Eclipse 带有一个安装程序。 I could not find any configuration menu in the installer.我在安装程序中找不到任何配置菜单。 My java version is:我的java版本是:

java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

on an ubuntu 14.04 64 bits.在 ubuntu 14.04 64 位上。

I tried to configure the proxy in the eclipse-inst.ini:我尝试在 eclipse-inst.ini 中配置代理:

...
-Djava.net.useSystemProxies=true
-Dhttps.proxyPort=8888
-Dhttp.proxyPort=8888
-Dhttps.proxyHost=localproxy
-Dhttp.proxyHost=localproxy

as documented here https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html but the installer hangs...如此处所述https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html但安装程序挂起...

There are two options:有两种选择:

  1. Download a full package instead of using the installer.下载完整的软件包而不是使用安装程序。 There's a link right on the downloads page, but here's where to get the packages .下载页面上有一个链接,但这里是获取软件包的位置
  2. Switch the installer to Advanced Mode (use the menu button in the top-right corner of the installer window).将安装程序切换到高级模式(使用安装程序窗口右上角的菜单按钮)。 In Advanced Mode there is a place to confiure proxy settings:在高级模式中有一个地方可以配置代理设置:

在此处输入图片说明

A simpler approach would be to set up proxy in your command line:一种更简单的方法是在命令行中设置代理:

Linux: Linux:

bash $ export http_proxy=http://www-proxy.example.com:80
bash $ export https_proxy=http://www-proxy.example.com:80 # Replace with your proxy protocol, url and port.
bash $ cd <Folder where Eclipse installer is downloaded>
bash $ ./eclipse-inst

csh $ setenv http_proxy http://user:password@proxy.domain.com:port
csh $ setenv https_proxy http://user:password@proxy.domain.com:port
csh $ cd <Folder where Eclipse installer is downloaded>
csh $ ./eclipse-inst

Windows:窗户:

set HTTP_PROXY=http://user:password@proxy.domain.com:port
set HTTPS_PROXY=http://user:password@proxy.domain.com:port

and invoke the eclipse-inst tool from the same command line.并从同一命令行调用 eclipse-inst 工具。

I could find a workaround, which is to copy a valid network configuration from a previous Eclipse Mars configuration.我可以找到一种解决方法,即从以前的 Eclipse Mars 配置中复制有效的网络配置。

cp <old_eclipse>/configuration/.settings/org.eclipse.core.net.prefs <neon_installer_path>/eclipse-installer/configuration/.settings

It works, but it really looks like a hack, any other clues?它有效,但它看起来真的很像黑客,还有其他线索吗?

Solution worked for me: Windows:解决方案对我有用:Windows:

set HTTP_PROXY= http://user:password@proxy.domain.com:port set HTTPS_PROXY= http://user:password@proxy.domain.com:port and invoke the eclipse-inst tool from the same command line. set HTTP_PROXY= http://user:password@proxy.domain.com:port set HTTPS_PROXY= http://user:password@proxy.domain.com:port并从同一命令行调用 eclipse-inst 工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM