Core Java

How to download Java 64 bit

In this post, we feature a comprehensive article about how to download Java 64 bit which contains the Java Virtual Machine(JVM), Java Runtime Environment and Java Development Toolkit(JDK).

As we all know, Java is a very popular programming language mainly because it is free and platform independence. To develop the java program, the first step is to download and install the java.

This article will guide you on how to download and install java 64 bit on Windows and on Linux. 5 simple steps have to be followed. These are:

  • Identify your need
  • Choose Windows or Ubuntu OS
  • Download
  • Install
  • Verify

1. Identify your need

  • If you want to execute a java program, you need its java runtime environment (JRE).
  • If you want to execute java program in the browser, you need to enable java web plugin in the browser.
  • If you want to develop and execute java application, you need a Java development kit (JDK) because it contains all the necessary tools along with the JRE.

Our need is to install JDK 64 bit. Let’s start downloading…

2. Download Java 64 bit for Windows

2.1 Download JDK

download Java 64 bit - JDK for Windows
Select JDK for Windows
  • Save the .exe to a specific folder or it will be available in the download directory.

2.2 Installation

  • Go to downloaded directory and double click the .exe and follow the instructions to install
download Java 64 bit - step 1
Installation step 1
download Java 64 bit - step 2
Installation step 2
download Java 64 bit - step 3
Installation step 3
download Java 64 bit - step 4
Installation step 4
  • Close the dialog as the installation is successful.
  • Now go to command prompt and type ‘javac’, you will get below output.
download Java 64 bit - Verifying javac
Verifying javac

2.3 Set environment variables

  • Javac is not recognized error is because of not setting the environment path.
  • Goto Computer -> Properties -> Advanced system settings
download Java 64 bit
  • Go to Advanced system settings -> Environment variables
download Java 64 bit
  • Select add ‘New User variable’ and include JAVA_HOME as a variable name and installed java path as a variable value.
  • Now select a new ‘System variable’ and include PATH as a variable name and %JAVA_HOME%\bin as a variable value.
  • If you already have a PATH variable, then just edit and add at the end “;%JAVA_HOME%\bin”
  • In some cases, you might need a restart to make it successful.

2.4 Verification

  • Now, enter javac in command prompt and check whether you are getting the below output.
javac verification
  • Enter java -version in command prompt and check
Installed java version

The above output shows Java installed successfully on your windows.

3. Download Java 64 bit on Ubuntu

In many ways, you can install Java on ubuntu. Here I will show you the easiest way to installing Java on Ubuntu

  • Installing the default Open JDK
  • Installing Oracle JDK

3.1 Install default JDK

To install the default JDK, execute the below command in terminal

sudo apt-get update
sudo apt-get install default-jdk

3.2 Install Oracle JDK

To install the Oracle JDK, follow the below instruction

java runtime environment
  • Extract the saved file using below command
 tar -xvf ~/Downloads/jdk-13.0.1_linux-x64_bin.tar.gz
java runtime environment
  • Create a directory
 sudo mkdir -p /opt/java/jdk-13.0.1/
  • Move the extracted JDK into the newly created directory
 sudo mv jdk13.0.1*/* /opt/java/jdk-13.0.1/
  • Configure the java
java runtime environment
 sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk-13.0.1/bin/java" 1 
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/jdk-13.0.1/bin/javac" 1 
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/jdk-13.0.1/bin/javaws" 1
java runtime environment
  • If you want to include system variables, you can directly include the java path in .bashrc file (or) in /etc/profile. Easiest is to include it in .bashrc file.
  • .bashrc is the hidden file. Access the file using below command
 sudo gedit . bashrc.
  • Add the java path at the end of the file, save and close it.
 export JAVA_HOME=/opt/java/jdk-13.0.1
export PATH=$JAVA_HOME/bin:$PATH
java runtime environment
  • Now its time to verify the java installation
java runtime environment

The above output shows Java installed successfully on your Ubuntu.

I hope this article helps you with your first step towards Java by downloading and installing it in your system. Happy coding!!!

Kavitha Ashok

Kavitha has a Master's degree in Information Technology and a Master's degree in Business Administration. She started her career as a Junior Software Developer trainee and moved up as a Technical lead. She has been involved with projects in various domains such as CMS, IMS, android and digital TV products, applications, web services, etc. , She is mainly involved in development, design, analysis, refactoring, etc., based on Java and other technologies.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button