On Windows (10):
- extract zip to Program Files/Java/
- change JAVA_HOME environmental variable to point to the new JDK
On Ubuntu (16.04) for version 11.0.2:
- unpack tar.gz to /usr/lib/jvm/ (command taken from OpenJDK installation guide)
sudo tar xvf openjdk-11*_bin.tar.gz --directory /usr/lib/jvm/
- update alternatives to be able to switch between other java installations (command taken from DZone guide)
sudo sh -c 'for bin in /usr/lib/jvm/jdk-11.0.2/bin/*; do update-alternatives --install /usr/bin/$(basename $bin) $(basename $bin) $bin 100; done' sudo sh -c 'for bin in /usr/lib/jvm/jdk-11.0.2/bin/*; do update-alternatives --set $(basename $bin) $bin; done'
- don't forget to update the JAVA_HOME environmental variable if you use maven
No comments:
Post a Comment