[英]No such file or directory Java Ubuntu
I get the message no such file or directory as you can see in the image below: 我收到消息,没有您在下图中看到的此类文件或目录:
As you can see I do have a bin
folder in /usr/lib/java/jdk1.8.0_144/bin
如您所见,我在/usr/lib/java/jdk1.8.0_144/bin
确实有一个bin
文件夹
In my .bashrc
file I have the following contents: 在我的.bashrc
文件中,我具有以下内容:
#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 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" 在清单中已安装Java,但执行时会产生“ ./java:没有这样的文件或目录”
And I had followed Petesh answer to use the ldd java
command to see which packages I´m missing. 我按照Petesh的回答使用了ldd java
命令来查看我缺少的软件包。 But as you can see in the image below it didn´t worked out: 但是,如您在下图中看到的那样,它没有解决问题:
However I can see that both java -version
and ldd --version
commands are working. 但是我可以看到java -version
和ldd --version
命令都可以正常工作。 I´m using a 64-bit notebook. 我正在使用64位笔记本电脑。 Can someone maybe help me, please? 有人可以帮我吗?
java
appears to be correctly installed, you can run "java" with java
似乎已正确安装,您可以使用
$ java <MYOPTIONS>
Your error is trying to execute your "PATH" with $PATH
if you want to display the path, you echo it. 您的错误是试图使用$PATH
执行“ PATH”,如果您想显示路径,则回显它。 Like, 喜欢,
$ echo $PATH
Or, if you want to find where java is 或者,如果您想找到java在哪里
$ type -path java
/usr/bin/java
Or, the more usual Ubuntu way 或者,更常见的Ubuntu方法
$ 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.