Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Java is a cross-platform programming language created by Sun Microsystems and is now owned by Oracle. Do not confuse this tag with JavaScript or JScript. Questions about installing/running Java on macOS are welcome, questions about Java programming must be asked on StackOverflow.
17
votes
How does /usr/bin/java work on Mac?
TL:DR;
I think that /usr/bin/java is a proxy application, part of MacOS, that calls the java command in the current java installation as defined by JAVA_HOME env var. … just by setting a different JAVA_HOME, the version switches:
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home && java -version
java version "1.8.0_112"
Java(TM) SE Runtime …