Eclipse - 如何从命令行传递VM参数(不更改eclipse.ini)

时间:2014-02-05 10:02:30

标签: eclipse command-line-arguments p2-director

如何将VM参数从命令行传递到eclipse?

我正在尝试使用eclipse p2 director将插件安装到Eclipse中,但它变慢并试图在download.eclipse.org上搜索

帮助页面上有通知说:

  

执行这些操作时,可以通过将VM参数eclipse.p2.mirrors设置为false来禁用自动镜像选择机制。

搜索我得到"Why Eclipse’s “Check for Updates” is horribly slow (and how to fix it)"

  

在“eclipse”之后或在eclipse.ini中添加它   -Declipse.p2.mirrors =假

然而

eclipsec -Declipse.p2.mirrors=false -application org.eclipse.equinox.p2.director -repository http://www.nodeclipse.org/updates/ -installIU org.nodeclipse.jjs.feature.feature.group/0.10.0 

- >未知选项

eclipsec -vmargs -Declipse.p2.mirrors=false -application org.eclipse.equinox.p2.director -repository http://www.nodeclipse.org/updates/ -installIU org.nodeclipse.jjs.feature.feature.group/0.10.0 

- >启动工作台

eclipsec -application org.eclipse.equinox.p2.director -repository http://www.nodeclipse.org/updates/ -installIU org.nodeclipse.jjs.feature.feature.group/0.10.0 -vmargs -Declipse.p2.mirrors=false 

- >放到最后没有效果

更新:我无法安装,所以我认为原因是p2导演在download.eclipse.org上搜索并失败。然后在Greg建议之后,我确定那些参数将在哪里和版本中播放(它只传递确切的版本: 空或0.10.0.qualifier不适合。所以现在安装成功但仍然很慢,可能因为仍然联系download.eclipse.org。记录下面

eclipsec -application org.eclipse.equinox.p2.director -repository http://www.nodeclipse.org/updates/ -installIU org.nodeclipse.jjs.feature.feature.group/0.10.0.201401270634 -vmargs -Declipse.p2.mirrors=false

使用来自ATD-Bundle的eclipse

D:\Android\eclipse>r -repository http://www.nodeclipse.org/updates/ -installIU org.nodeclipse.jjs.feature.feature.group/0.10.0.201401270634 -vmargs -Declipse.p2.mirrors=false
Їхт 05, 2014 7:17:31 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond
Їхт 05, 2014 7:17:31 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Їхт 05, 2014 7:17:39 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond
Їхт 05, 2014 7:17:39 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Installing org.nodeclipse.jjs.feature.feature.group 0.10.0.201401270634.
Їхт 05, 2014 7:18:10 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond
Їхт 05, 2014 7:18:10 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Їхт 05, 2014 7:18:20 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond
Їхт 05, 2014 7:18:20 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Їхт 05, 2014 7:18:31 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond
Їхт 05, 2014 7:18:31 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Operation completed in 78172 ms.

1 个答案:

答案 0 :(得分:0)

很久以前这个问题就解决了,但我忽略了分享。

现在Nodeclipse CLI Installer内部的工作原理是将VM args放在最后:

nci i markdown Nodeclipse CLI Installer (nci , Eclipse Plugin Manager epm) http://www.nodeclipse.org/updates/ starting eclipsec -nosplash -application org.eclipse.equinox.p2.director -repository http://www.nodeclipse.org/updates/ -installIU markdown.editor.feature.feature.group -tag markdown.editor.feature.feature.group -vmargs -Declipse.p2.mirrors=false