How do I change Java version in Linux terminal?
Answer
To set the Java version interactively:
Answer
To set the Java version interactively:
- Log in as root or use sudo .
- View the Java alternatives. sudo update-alternatives –config java. …
- Select a Java version, at the prompt, type a number. Press enter to keep the default
- , or type selection number: …
- Verify the switch, check the Java version. java -version.