linux - java -version returning an error but bash profile is correct -


when run java -version returns:

-bash: java: command not found. 

when go opt/java/bin/java -version returns 1.6 etc expected.

if tab java's available @ prompt get:

javac javadoc javah javap 

but not plain old java.

my ~/.bash_profile reads:

java_home=/opt/java/ export java_home 

tried re-installing java, seeing same result. missing something?

am missing something?

  1. your bash profile not correct.

  2. if /opt/java java installation directory, need /opt/java/bin on command search path; i.e. path environment variable.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -