This chapter will cover the Java Environment Setup. This is the most important thing to do to start learning Java. We will cover everything we need to do to properly setup the Java environment on our PC or laptop. I will explain it in a simple way.
Table of contents
Local Environment Setup In Java
If you are decided to set up your machine for the Java programming language, this section will show you how to download and install Java. Here are the steps you need to take to set up the environment.
The first thing you need to do is download the Java SE Development Kit, which you can get here Java SE Development Kit. Download a version that works with your computer’s operating system.
Follow the steps to download Java and then run the .exe file to put Java on your computer. Once you’ve installed Java on your computer, you’ll need to set environment variables to point to the right installation directories.
Java Environment Setup – Setting up Windows Path
Assuming you’ve installed Java in C:\Program Files\Java\jdk directory –
- The first thing to do is go to ‘My Computer’ right click and select ‘Properties’.
- Second step is to click Environment Variables from the ‘Advanced’ tab.
- Lastly, alter the ‘Path’ variable so that it also contains the path to the Java executable. For example, if the path is currently set to ‘C:\WINDOWS\SYSTEM32’, then change your path to read ‘C:\WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin’.
Setting up the path for Linux, UNIX, Solaris, and FreeBSD
The Environment variable PATH should be set to point to where the Java binaries have been installed. If you don’t know how to do this, look at the documentation that came with your shell.
For example, if you are using bash as your shell, then you would add the following line to the end of your ‘.bashrc: export PATH = /path/to/java:$PATH‘.
Most Popular Java Editors
- NetBeans – NetBeans is a development environment for the Java programming language. NetBeans makes it possible to build applications from a group of software parts called modules. NetBeans works on Linux, Solaris, macOS, and Windows. You Can Download Here. NetBeans IDE
- intelliJ IDEA – IntelliJ IDEA is an integrated development environment for Java, Kotlin, Groovy, and other JAR-based languages. It was written in Java. It is made by JetBrains, and there is an Apache 2 Licensed community edition and a commercial edition that JetBrains owns. You Can Download Here. intelliJ IDEA
- Eclipse IDE – Eclipse is a computer programming tool that is used as an integrated development environment. It has a basic workspace and a system of plug-ins that can be added to change the environment. It is the second most popular IDE for Java development and was the most popular IDE until 2016. You Can Download Here. Eclipse IDE
Online Java Compiler
We also have a Java Online Compiler available on our page if you wish to practice or code online. Here is the link. Java Online Compiler
The primary topic of this chapter is Java Environment Setup, which tries to make it simple for users to install Java on their particular operating system.. I hope this article is useful to you and you learned a lot. See you in the next chapter.
What is Next?
In the next chapter, you’ll learn how to write and run your first Java program, as well as some of the most important basic syntaxes in Java that are needed to make your own applications.