1

I get the message no such file or directory as you can see in the image below: enter image description here

As you can see I do have a bin folder in /usr/lib/java/jdk1.8.0_144/bin

In my .bashrc file I have the following contents:

#Java HOME directory setup
export JAVA_HOME=/usr/lib/java/jdk1.8.0_144
export PATH="$PATH:$JAVA_HOME/bin"

I also came across the following 2 questions:

https://askubuntu.com/questions/207552/no-such-file-or-directory-when-invoking-java

Java is installed, in listing, but execution produces "./java: No such file or directory"

And I had followed Petesh answer to use the ldd java command to see which packages I´m missing. But as you can see in the image below it didn´t worked out: enter image description here

However I can see that both java -version and ldd --version commands are working. I´m using a 64-bit notebook. Can someone maybe help me, please?

superkytoz
  • 1,267
  • 4
  • 23
  • 43

2 Answers2

2

java appears to be correctly installed, you can run "java" with

$ java <MYOPTIONS>

Your error is trying to execute your "PATH" with $PATH if you want to display the path, you echo it. Like,

$ echo $PATH

Or, if you want to find where java is

$ type -path java
/usr/bin/java

Or, the more usual Ubuntu way

$ update-java-alternatives -l
java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64
java-8-oracle                  1081       /usr/lib/jvm/java-8-oracle
Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249
0

Had a similar issue on my Ubuntu, all variables were set correctly but had an error anyway. Turned out that my Ubuntu was missing some packages. Fixed with following lines

apt-get install libc6-i386
absence
  • 308
  • 2
  • 16