|
|
Where is OS X's Java VM?
|
|
|
|
Fresh-Faced Recruit
Join Date: Aug 2007
Status:
Offline
|
|
Simple question here,
Which directory is the Java VM in? On Windows, it's simply C: \Windows\System32\java.exe, but on OS X I'm not so sure. I need to know for piece of software I'm designing, which requires the absolute path to the Java VM on each platform. Thanks.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Aug 2007
Status:
Offline
|
|
Well it looks like I found it myself. It's hidden in the usr/bin/ directory.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
which java
will reveal the path to the Java binary,
which javac
will reveal the path to the Java compiler
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
The files in /usr/bin are actually just symlinks to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands - with Current there being a symlink to your chosen Java VM version.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2004
Location: Downtown Austin, TX
Status:
Offline
|
|
Originally Posted by besson3c
which java
will reveal the path to the Java binary,
which javac
will reveal the path to the Java compiler
Interesting. So what's the difference between which and whereis?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Originally Posted by jamil5454
Interesting. So what's the difference between which and whereis?
which: Checks all the directories in your PATH to find the first one containing the program you named.
whereis: Checks the standard binary directories to find the first one containing the program you named.
So, for example, I have the program git in /usr/local/bin. If I do which git, I get /usr/local/bin/git, whereas if I do whereis git, I get nothing at all.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|