bin/java: Permission denied
时间: 2023-08-27 07:06:14 浏览: 148
hadoop单机配置方法
这个错误信息通常表示您没有足够的权限来执行位于 "/usr/local/jdk-11.0.16/bin/java" 的 Java 二进制文件。您可以通过检查 "java" 二进制文件的文件权限来确认。可以运行命令 "chmod +x /usr/local/jdk-11.0.16/bin/java" 来为该文件添加可执行权限。另外,您还可以编辑 "/etc/profile" 文件,添加以下内容来设置 Java 环境变量:
```
#set java environment
JAVA_HOME=/usr/java/jdk1.8.0_144
JRE_HOME=/usr/java/jdk1.8.0_114/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
```
这样设置后,您应该能够正常执行 Java 二进制文件了。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* *2* [解决bash: /usr/local/jdk-11.0.16/bin/java: Permission denied报错](https://blog.csdn.net/m0_73140107/article/details/130208579)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [bash: /home/jdk1.8.0_161/bin/java: Permission denied](https://blog.csdn.net/qq_20867981/article/details/79492533)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文