If I run echo $PATH
, I get:
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
Amongst others.
If I make a simple application that does the same:
public class Test {
public static void main(final String[] args) {
System.out.println(System.getenv().get("PATH"));
}
}
When I run this from the console (java -jar test.jar
):
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
And yet when I run that same application in Eclipse:
/usr/bin:/bin:/usr/sbin:/sbin
Why isn't Eclipse picking up all the environment variables?