Sponsored Links
Ad by Google
In this tutorial, I am going to show you how to install Java on Linux machine.
To learn Java of-course first thing you need to install Jdk, so lets start the installation.
Step 2. Extract the tar file downloaded from the above link, below is the syntax to extract the tar file
Open .bashrc and .profile file and set the JAVA_HOME with below commands on terminal-
i. Type vi ~/.bashrc it will open a vi editor, of-course you can open in any editor like gedit,nano etc.
ii. Place this
iii. Type source ~/.bashrc on your terminal
Also repeat the same points from i to ii to set path in .profile file
and done.
Step 4. To verify your java is installed properly or not you can type java -version it will print the installed java details and see the installed path type echo $JAVA_HOME on your terminal.
Here is the output of the above commands if java installed successfully.
To learn Java of-course first thing you need to install Jdk, so lets start the installation.
Steps to install JDK on Linux
Step 1. Go to the Oracle official site (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) accept the license and download the appropriate product from the above link.Step 2. Extract the tar file downloaded from the above link, below is the syntax to extract the tar file
tar -xzf jdk-8u65-linux-x64.tar.gzStep 3. Set the JAVA_HOME environment variable using below command type the below syntax on terminal.
export JAVA_HOME=/home/ubuntu/Softwares/jdk1.8.0_65(installed jdk path) export PATH=${PATH}:${JAVA_HOME}/binor
Open .bashrc and .profile file and set the JAVA_HOME with below commands on terminal-
i. Type vi ~/.bashrc it will open a vi editor, of-course you can open in any editor like gedit,nano etc.
ii. Place this
export JAVA_HOME=/home/ubuntu/Softwares/jdk1.8.0_65(installed jdk path) export PATH=${PATH}:${JAVA_HOME}/bininside the .bashrc file opened with point i.
iii. Type source ~/.bashrc on your terminal
Also repeat the same points from i to ii to set path in .profile file
and done.
Step 4. To verify your java is installed properly or not you can type java -version it will print the installed java details and see the installed path type echo $JAVA_HOME on your terminal.
Here is the output of the above commands if java installed successfully.
Sponsored Links
I learned installing Java successfully and created my first mobile app a few days ago, and it was truly a fun experience. I did it under the guidance of Java experts.
ReplyDeleteThanks @M.Andy, Glad to hear from you that you liked it.
Delete