![]() If that gives you something like /usr/bin/java, which is a symbolic link to the real location, run ls -l `which java` ), with the ability to explicitly specify the desired Java version and architecture, or even request the user to install it if missing.Ī more pedestrian approach, but one which will help you trace specifically which Java installation the command java resolves into, goes like this: ![]() If you check out its help text ( java_home -h), you'll see that you can use this command to reliably start a Java program on OS X ( java_home -exec. This is the natively supported way to find out both the path to the default Java installation as well as all alternative ones present. The best generic way to find this out is to run /usr/libexec/java_home ![]() The location has changed from Java 6 (provided by Apple) to Java 7 and onwards (provided by Oracle).
0 Comments
Leave a Reply. |