You are not logged in.
I have installed jdk with pacman:
sudo pacman -S jdk-openjdk
but when I try compile a command with "javac" the system said i not have javac
I tried run java --version and show this:
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
So what do I do?
Last edited by wolfito-sam (2022-09-19 04:49:12)
Offline
What does `archlinux-java status` show?
Offline
What does `archlinux-java status` show?
Available Java environments:
java-11-openjdk
java-17-openjdk
java-8-openjdk/jre (default)
Offline
So there's your issue, the Java 8 JRE (without JDK) is set as default, so that's all that will be in your $PATH. If you want to use the Java 17 JDK, you need to set that as default.
Offline
Its solved, Thanks for help
Offline