1. Download Java
Open your web browser Type URL: https://www.oracle.com/java/technolog... to go to Oracle download page. This will lead you JAVA JDK download page Click on button “ JDK download ” for Java SE update 4. Accept oracle license agreement Find and click on the correct jdk download link right for your operating system to download Save the file to disk 2. Install Java $ sudo dpkg -i jdk-14_linux-x64_bin.deb $ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-14/bin/java 1 $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-14/bin/javac 1 Set Pathmaneesh@maneesh:~$ java --version
java 15.0.2 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
maneesh@maneesh:~$ java --version
java 15.0.2 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
maneesh@maneesh:~$ sudo update-alternatives --config java
[sudo] password for maneesh:
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/jdk-15.0.2/bin/java
Nothing to configure.
maneesh@maneesh:~$ s
Display all 164 possibilities? (y or n)
maneesh@maneesh:~$ sudo gedit /etc/environment
(gedit:2460): Tepl-WARNING **: 22:57:13.997: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.
maneesh@maneesh:~$ source /etc/environment
maneesh@maneesh:~$ echo $JAVA_HOME
/usr/lib/jvm/jdk-15.0.2
maneesh@maneesh:~$
Comments
Post a Comment