如何通过代理设置libGDX项目 [英] how to setup a libGDX project via proxy

查看:65
本文介绍了如何通过代理设置libGDX项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用libgdx项目创建者( gdx-setup.jar )设置新项目.但是,我在Windows计算机上使用代理连接访问Internet,并且gdx-setup.jar无法检测到设置,因此无法下载所需的jar文件并生成任何项目.如何以及在何处更改Java代理设置,以便能够实现此目的?

I am using the libgdx project creator (gdx-setup.jar) to setup a new project. However, I am using a proxy connection on my Windows machine to access the internet and the gdx-setup.jar isn't able to detect the settings, thus I cannot download the required jar files and generate any project. How and where do I change the java proxy settings so that I am able to achieve this?

PS:我已经尝试在控制面板"->"Java"->网络设置"下编辑设置,但无济于事.

PS: I have already tried to edit the settings under Control Panel->Java->Network Settings but to no avail.

推荐答案

摘自Gradle手册:

From Gradle's manual: 12.3. Accessing the web via a proxy

您可能需要创建$ HOME/.gradle/gradle.properties文件.例如:

You may need to create a $HOME/.gradle/gradle.properties file. For example:

systemProp.http.proxyHost=10.0.0.1
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=
systemProp.http.proxyPassword=
systemProp.http.nonProxyHosts=*.some.domain.com|localhost

重要提示:HTTPS有单独的设置.

IMPORTANT: There are separate settings for HTTPS.

systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

然后,像这样运行安装程序:

Then, just run setup like this:

java -Dhttp.proxyHost=10.0.0.1 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=10.0.0.1 -Dhttps.proxyPort=8080 -jar gdx-setup.jar

这对我有用,在HTTP代理后面.用您的代理设置进行更改.

This works for me, behind a HTTP Proxy. Change it with your proxy settings.

稍后,将您的项目导入Eclipse.并确保您的Eclipse网络代理也可以.

Later, import your projects into Eclipse. And make sure your Eclipse Network Proxy is OK too.

这篇关于如何通过代理设置libGDX项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆