0

I just installed JDK in Ubuntu. When I want to use the java command, I get this error:

/usr/bin/java: No such file or directory

but I declare the java home using update-alternatives:

update-alternatives --config java
There is 1 choice for the alternative java (providing /usr/bin/java).

Selection    Path                                   Priority   Status    
------------------------------------------------------------     
   0            /usr/local/java/jdk1.8.0_111/bin/java   1         auto mode    
 * 1            /usr/local/java/jdk1.8.0_111/bin/java   1         manual mode    

Press <enter> to keep the current choice[*], or type selection number: 

Even when I run java in /usr/local/java/jdk1.8.0_111/bin/ directory, it doesn't recognize it.
Thanks for any help.

I read this answer, but it didn't help me and I still have the same error.

valiano
  • 1,985
max
  • 109

0 Answers0