Changes

Default Java on Mint Linux

2,279 bytes added, 00:28, 10 November 2022
/* OpenJDK (example) */
The following lines were added (+) and removed (-):
== Error: There is only one alternative in link group java ==== Troubleshooting===== Error: There is only one alternative in link group java ===You will have to fix file permissions to match the other stuff in that directory.  chown root, chgrp root, chmod 755 recursive within the jre1.8.0_181 folder.To test, remember only one dash - on the version "java -version" command line switch /usr/lib/jvm/jre1.8.0_181/bin/java -versionHere is the Linux Mint 19.2 Example: $ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.8.0_181/bin/java" 8 $ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java).   Selection    Path                                        Priority  Status ------------------------------------------------------------ * 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java  1111      auto mode  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java  1111      manual mode  2            /usr/lib/jvm/jre1.8.0_181/bin/java            8        manual mode Press <enter> to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/lib/jvm/jre1.8.0_181/bin/java to provide /usr/bin/java (java) in manual mode $ java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)=== Cinnamon desktop shell menu says to open with one version yet it opens in another ===For example you right click on a jar file and choose  to open with Oracle Java 8 yet it opens in OpenJDK 8. On versions of Linux Mint / Cinnamon the Java Alternatives version you choose will override what the shell menu displays.  The shell does not know what mapping is in the sub system.  You can always set a specific path in the shell or just drop to CLI and change the alternative you wish to use for the particular jar file.  Hard setting the path in the shell is probably possible too.== Howto Install ... ===== OpenJDK (example) ===install sudo apt install openjdk-11-jdkremove sudo apt remove openjdk-11-jdkMinecraft works with openjdk-8-jdk sudo apt install openjdk-8-jdk=== Oracle Java (example) ====== Crappy IBM Java (example) ===install sudo apt install ibm-java80-jreremove sudo apt remove ibm-java80-jreSee: [[IBM Java Runtime Environment]]
52
edits