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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -