Download and install Java on the computer

To program Java on your computer, you need to install the Java environment, this tutorial will show you how to download and install Java on your computer.

Install Java on the computer

  1. Download Java based on the version of the operating system running on the computer.
  2. You need to tick the circle icon before Accept License Agreement to download the file.
  3. Run the .exe file to install Java.
  4. Setting the Environment variables to point to the correct installation directories.

Setting Paths on Windows:

Suppose, you install Java in the directory: c: Program Filesjavajdk1.8.0_162

Press the Windows + E key> right-click My Computer or My PC or This PC (depending on Windows)> Properties

Download and install Java on the computer Picture 1

Select Advanced system settings on the left or Change settings in the lower right corner.

Download and install Java on the computer Picture 2

Click the Environment variables button under the Advanced tab.

Download and install Java on the computer Picture 3

In the window that appears, click the New button as shown:

Download and install Java on the computer Picture 4

In the Variable name box, enter PATH , in the Variable value box, you enter the path of the Java bin directory in drive C. On your computer it is: C: Program FilesJavajdk1.8.0_162bin.

Download and install Java on the computer Picture 5

Please enter these two values ​​correctly, otherwise you will not be able to run Java files. It will generate an error message after compiling a Java file:

 C:java files>javac Hello.java 
'javac' is not recognized as an internal or external command, operable program or batch file

Path settings on Linux, Unix, Solaris, FreeBSD:

Paths should be set to point to where Java programs are installed. For example, if using bash as a shell, add the following line at the end: '.bashrc: export PATH = / path / to / java: $ PATH'.

Popular Java editors

To write Java programs, you will need a text editor. There are many IDEs, but below are some that are more suitable for editing Java code:

  1. Notepad: On Windows, you can use any simple editor like Notepad, TextPad.
  2. Netbeans: A free, open-source Java IDE.
  3. Eclipse: Also open source and free.

After installing Java, the next lesson will learn how to write and run the first Java program, some basic Java syntax that is important for developing applications.

Next lesson: Basic Java syntax

Last lesson: What is Java? Why choose Java?

Java exercises: Basic Java exercises, with sample decoding

3.5 ★ | 2 Vote

May be interested

  • Write and run Java code on the computer for the first timeWrite and run Java code on the computer for the first time
    after you've installed java and set up a path on your computer, you need to know how to run a simple java code on your computer. in this article, we will try to write the first java program, as well as the commands to run this program in cmd.
  • How to Fix JavaHow to Fix Java
    java is a computing platform that allows you to play games and view videos on your computer. you can tell that your computer is having problems with java if you see java errors appear when you try to run a program or visit a website that...
  • How to install multiple Java versions on CentOS 8How to install multiple Java versions on CentOS 8
    java is one of the most widely used high-level programming languages. in this article, readers will learn how to install different versions of java on centos 8.
  • What is Java? Why choose Java?What is Java?  Why choose Java?
    what is java? java is a high-level programming language, developed by sun microsystem and released in 1995. java runs on a variety of platforms, such as windows, mac and various versions of unix.
  • How to install, use Kemulator to play Java games on your computerHow to install, use Kemulator to play Java games on your computer
    kemulator is a java emulator software on your computer, making it easy to play java games, play phone games on your computer.
  • How to Tune a Java Virtual Machine (JVM)How to Tune a Java Virtual Machine (JVM)
    the java virtual machine (jvm) runs your java programs. sometimes the default configuration that the jvm comes with may not be the most efficient for your program.
  • Search and launch Java Control Panel on Windows operating systemSearch and launch Java Control Panel on Windows operating system
    in java control panel you can search and change java settings. in the following article, network administrator will show you how to search for java control panel on windows operating system.
  • Basic Java syntaxBasic Java syntax
    a java program can be defined as a collection of objects, communicating through calling each other's procedures. now we will look at the class, object, procedure and instance variable / instance variable to consider their meaning.
  • How to Download a Java Development Kit to Program on AndroidHow to Download a Java Development Kit to Program on Android
    java is one of the world's most popular programming languages, right next to c++. owned by oracle, java is a fairly easy programming language to learn partly because the code relate to real language, since it is an object oriented...
  • How to Compile a Java ProgramHow to Compile a Java Program
    this wikihow teaches you how to turn your java source code into an executable app using a local and online compiler. if you're using a computer, the most common way to compile java code is using java software development kit (java sdk)...