Environment variables for the Eclipse plugin
To analyze open source dependencies and IAC template files, the plugin uses the Snyk CLI. The CLI needs the following environment variables:
PATH
: The path to needed binaries, for example, to Maven. ThePATH
variable can also be manually adjusted using thePath
field in the settings dialog.JAVA_HOME
: The path to the JDK you want to use to analyze Java dependencies.http_proxy
andhttps_proxy
: Proxy set using the value in the formathttp://username:password@proxyhost:proxyport
. Note: the leadinghttp://
in the value does not change tohttps://
for anhttps_proxy
. If you populate the proxy settings in Eclipse, the Snyk plugin will set the environment variables automatically for Language Server and CLI.
Setting these variables only in a shell environment (for example, using ~/.bashrc
) is not enough, if you do not start Eclipse from the command line or create a script file that starts Eclipse using a shell environment.
On Windows, set the variables using the GUI or on the command line using the setx tool.
On macOS, the process
launchd
needs to know the environment variables to launch Eclipse directly from the Finder. Set these environment variables using thelaunchctl setenv
command (for example, on start up or using a script you launch at user login). Note: Providing environment variables to the macOS UI may change between operating system releases, so it can be easier to create a small shell script that launches the Eclipse app to leverage the shell environment. This can be defined via~/.bashrc
.On Linux, you can update the file
/etc/environment
to propagate the environment variables to the windows manager and UI.
Summary: Snyk's Eclipse plugin uses the proxy settings from Eclipse, but also picks up the proxy settings from the environment variables.
Last updated