Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
What exactly does the path need to tell Lejos? Where to find the java compiler? – Thorbjørn Ravn Andersen Jun 1 '13 at 17:15
up vote 2 down vote accepted

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

share|improve this answer
Thank you! Now to actually get to work. – Adam Hammes Jun 1 '13 at 16:38

use "which" in terminal when you want to find the directory of a command:

which java


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.