eclipse Eclipse无法连接到互联网

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7778484/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:36:04  来源:igfitidea点击:

Eclipse can not connect to internet

eclipse

提问by Tiago Veloso

I am using Eclipse 3.6. I am trying to download a plug in from an update site, but it won't connect, it keeps saying "Pending" for quite some time.

我正在使用 Eclipse 3.6。我正在尝试从更新站点下载插件,但它无法连接,它一直说“待定”很长一段时间。

回答by Fredrik

Not alot of information there. It helps to let us know what you have tried...

那里的信息不多。让我们知道您尝试过的内容会有所帮助...

I'll quote an answer I gaveto a similar question, which contains the basic workarounds:

我将引用对类似问题的回答,其中包含基本的解决方法:



Can you connect to internet at all through Eclipse?

你能通过 Eclipse 连接到互联网吗?

Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser. Look up any normal adress, is it working?

打开内部网络浏览器。在 Eclipse 中:窗口 -> 显示视图 -> 其他 -> 常规:内部 Web 浏览器。查找任何正常地址,是否有效?

Can you connect to another update site? Try for example Eclipse Emma: http://update.eclemma.org/Do you see anything there?

您可以连接到另一个更新站点吗?尝试例如 Eclipse Emma:http: //update.eclemma.org/你在那里看到什么了吗?

What are your proxy preferences? Go to Window -> preferences -> General: Network connections.

您的代理偏好是什么?转到窗口 -> 首选项 -> 常规:网络连接。

The active provider:

主动提供者:

Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.

指定打开连接时要使用的设置配置文件。选择直接提供程序会导致在不使用代理服务器的情况下打开所有连接。选择 Manual 会导致使用 Eclipse 中定义的设置。在某些平台上,还有一个 Native 提供程序可用,选择此提供程序会导致使用在操作系统中发现的设置。

If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.

如果 Internet 在 Eclipse 之外工作正常,请尝试更改为 Native。之后,尝试直接。

回答by typoerrpr

Here's one more option to try if none of the efforts above helped. You might be using Eclipse from a Shared Drive (for eg, H:). If so, move/copy it the entire Eclipse directory to C: and try again.

如果上述努力都没有帮助,这里还有另一种选择。您可能正在使用共享驱动器中的 Eclipse(例如,H:)。如果是这样,请将整个 Eclipse 目录移动/复制到 C: 并重试。

My Eclipse could not connect to internet, nor access Eclipse Marketplace, nor even open ports for Tomcat server. I am behind a corporate proxy and tried many options that I have found on Stack Overflow and other forums but to no avail. I've also tried different versions (Mars, Luna, Kepler and a corporate-provided Kepler).

我的 Eclipse 无法连接到 Internet,也无法访问 Eclipse Marketplace,甚至无法打开 Tomcat 服务器的端口。我支持公司代理,并尝试了我在 Stack Overflow 和其他论坛上找到的许多选项,但都无济于事。我还尝试了不同的版本(Mars、Luna、Kepler 和公司提供的 Kepler)。

These are the options I have tried:

这些是我尝试过的选项:

Use Direct Connection

使用直接连接

  • Go to Windows > Perferences > General > Network Connections.
  • Change Active Provider to Direct.
  • Restart Eclipse.
  • 转到 Windows > 首选项 > 常规 > 网络连接。
  • 将 Active Provider 更改为 Direct。
  • 重新启动 Eclipse。

Set up Manual Proxy

设置手动代理

  • Go to Windows > Perferences > General > Network Connections.
  • Change Active Provider to Manual.
  • Input proxy details, including username/password if required.
  • Clear SOCKS proxy.
  • Restart Eclipse.
  • 转到 Windows > 首选项 > 常规 > 网络连接。
  • 将 Active Provider 更改为 Manual。
  • 如果需要,输入代理详细信息,包括用户名/密码。
  • 清除 SOCKS 代理。
  • 重新启动 Eclipse。

Change Eclipse.ini

更改 Eclipse.ini

  • Go to Windows > Perferences > General > Network Connections.
  • Change Active Provider to Native.
  • Open Eclipse.ini.
  • 转到 Windows > 首选项 > 常规 > 网络连接。
  • 将 Active Provider 更改为 Native。
  • 打开 Eclipse.ini。

Add the following under -vmargs, each on its own line.

在 下添加以下内容-vmargs,各占一行。

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=myproxy
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1
-Djava.net.preferIPv4Stack=true
  • Restart Eclipse
  • 重启 Eclipse

See:

看:

Add Eclipse to Firewall

将 Eclipse 添加到防火墙

Delete Oomph-releated sub folders

删除 Oomph 相关的子文件夹

  • Delete all Oomph-releated sub folders in ${user.home}/.eclipse/ folder
  • For Windows this may be in C:\Users\.eclipse
  • 删除 ${user.home}/.eclipse/ 文件夹中所有与 Oomph 相关的子文件夹
  • 对于 Windows,这可能位于 C:\Users\.eclipse

See answer by Stephan EberleFriend on Fri, 14 August 2015 18:54: https://www.eclipse.org/forums/index.php/t/270718/

请参阅 Stephan EberleFriend 于 2015 年 8 月 14 日星期五 18:54 的回答:https://www.eclipse.org/forums/index.php/t/270718/

See my other answer for Eclipse not able to open ports for Tomcat (https://stackoverflow.com/a/37246227/4212710).

请参阅我对 Eclipse 无法打开 Tomcat 端口的其他答案(https://stackoverflow.com/a/372​​46227/4212710)。

回答by Sathaiah Chippa

If eclipse could not able to connect to internet, following may beone of the reason: There is a service called "Network Access Protection Agent", which might be blocking eclipse from accessing the internet.

如果 eclipse 无法连接到 Internet,可能是以下原因之一: 有一项名为“网络访问保护代理”的服务,该服务可能会阻止 eclipse 访问 Internet。

In this case, you can try the following (this worked for me-Windows 7 PC): 1. Click on Windows Start button and search for Administrative Tools and Open it 2. Then open Services 3. Look for "Network Access Protection Agent" service 4. Stop this service 5. Now eclipse should be able to connect to internet

在这种情况下,您可以尝试以下操作(这适用于我的 Windows 7 PC): 1. 单击 Windows 开始按钮并搜索管理工具并打开它 2. 然后打开服务 3. 查找“网络访问保护代理”服务 4. 停止此服务 5. 现在 eclipse 应该能够连接到互联网

Note: This happens when Windows are not up to date. So after stopping this service, update your Windows, then start this service.

注意:当 Windows 不是最新版本时会发生这种情况。因此,停止此服务后,请更新您的 Windows,然后启动此服务。