Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I type which java in a terminal, I get

/usr/local/tools/i386_Darwin/jdk1.7.0_21/bin/java

and on typing echo $JAVA_HOME, I get

/usr/local/tools/i386_Darwin/jdk1.7.0_21

If I try java -version or /usr/bin/java --version or java -V, however, it's freezing up.

On typing type java, it gives me:

java is hashed (/usr/local/tools/i386_Darwin/jdk1.7.0_21/bin/java)

I'm not sure if I'm supposed to set up an environment variable or should I reinstall jdk?

share

migration rejected from stackoverflow.com Aug 15 at 13:31

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too broad by KronoS, Jens Erat, Kevin Panko, Scott, Michael Kjörling Aug 15 at 13:31

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Off topic ... maybe this should be on serverfault.com –  Tim Bender Jun 17 '13 at 18:40

Browse other questions tagged or ask your own question.