Error: JAVA_HOME is not set.
[root@ecs-5609 fe]# which java
/usr/bin/java
[root@ecs-5609 fe]# ll /usr/bin/java
lrwxrwxrwx 1 root root 22 12月 21 2020 /usr/bin/java -> /etc/alternatives/java
[root@ecs-5609 fe]# ll /etc/alternatives/java
lrwxrwxrwx 1 root root 76 12月 21 2020 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.h5.ky10.aarch64/jre/bin/java
cat > /etc/profile.d/openjdk.sh <<'EOF'
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.h5.ky10.aarch64/jre/
export PATH=$PATH:$JAVA_HOME/bin
EOF
source /etc/profile
Similar Posts:
- JAVA Command Error: A JNI error has occurred, please check your installation and try again [Solved]
- [Solved] Err:12 http://security.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.11+9-0ubuntu2~20.04 404 Not Found [IP: 91.189.88.152 80]
- gradle –version Error: ERROR: JAVA_HOME is set to an invalid directory: /usr/local/opt/openjdk
- [Solved] E: dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the probl…
- [Solved] java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException (Upload Images Error)
- [Solved] NB: JAVA_HOME should point to a JDK not a JRE
- Detailed explanation of Ubuntu update alternates command
- HDFS Operate hadoop Error: Command not Found [How to Solve]
- [Solved] aarch64-none-elf-gcc: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’