MacOS – How to find the Java directory in 10.8.3

javamacos

I'm trying to run a Lejos application on an NXT. For it to work I need to set up a profile page with the path of Java. I know that Java doesn't come pre-installed on my Mac version, so I downloaded a .dmg to install it. I kept looking for what path the installer used, but I never found it.

I know that java is installed because I ran

java -version 

on terminal, but still can't find the path. Anyone else know how?

Best Answer

The command which java will tell you where the java binary is within your $PATH.