Linux command
archlinux-java 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List
archlinux-java status
Get
archlinux-java get
Set
archlinux-java set java-17-openjdk
Unset
archlinux-java unset
Fix
archlinux-java fix
说明
archlinux-java is an Arch Linux utility for switching between installed Java environments. It manages symbolic links at /usr/lib/jvm/default and /usr/lib/jvm/default-runtime to set the default Java version system-wide. It is provided by the java-runtime-common package.
参数
- status
- List all installed Java environments and show which is default
- get
- Return the short name of the current default Java environment
- set JAVA_ENV
- Set the specified Java environment as default
- unset
- Remove the default Java environment setting
- fix
- Fix an invalid or broken default Java environment configuration. If no default is set, looks for valid environments and sets one automatically, preferring OpenJDK.
FAQ
What is the archlinux-java command used for?
archlinux-java is an Arch Linux utility for switching between installed Java environments. It manages symbolic links at /usr/lib/jvm/default and /usr/lib/jvm/default-runtime to set the default Java version system-wide. It is provided by the java-runtime-common package.
How do I run a basic archlinux-java example?
Run `archlinux-java status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does status do in archlinux-java?
List all installed Java environments and show which is default