Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Using a Proxy

Roland Grunberg edited this page Jun 14, 2021 · 3 revisions

When using the Java extension behind a corporate proxy, you might need to let the Java Language server know how to connect to the Internet, in order to download build runtimes, java dependencies and their sources through that proxy.

This is done by configuring the java.jdt.ls.vmargs setting in VS Code preferences (all on one line):

{
"java.jdt.ls.vmargs": "-Dhttp.proxyHost=webproxy.corp.net -Dhttp.proxyPort=proxyport -Dhttp.proxyUser=user -Dhttp.proxyPassword=password -Dhttps.proxyHost=webproxy.corp.net -Dhttps.proxyPort=proxyport -Dhttps.proxyUser=user -Dhttps.proxyPassword=password"
}

You could, in theory, set the proxy settings in VS Code's workspace preferences, but you certainly don't want these sensible settings to be made publicly available. So the user preferences are the preferred choice most of the time.

However, you need to be aware workspace preferences will override any user preferences, so for instance, memory settings defined in the workspace preferences's java.jdt.ls.vmargs would replace proxy settings set the user preferences.

To disable all proxy settings, use the option -Djdt.ls.disableProxies=true

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.