If you wish to establish the Java programming environment, in this article, Mytour will instruct you on how to download and set up Java on your computer.
Setting up the Java Programming Environment
Follow the steps below to set up the Java programming environment:
Java SE is free software that facilitates users in performing programming tasks more easily. You can choose the Java SE version based on the operating system you are using.
Download Java SE to your computer and install it here: Download Java SE Development Kit
Follow the instructions to download Java SE to your computer and run the .exe file to install it. After installing Java on your computer, you will need to set up environment variables to point to valid installation directories.
Setting up Paths for Windows
Assuming you have installed Java in the directory C:\Program Files\java\jdk.
Right-click on My Computer (or This PC), select Properties.
In the Advanced tab, click the Environment variables button.
Change the 'Path' variable to include the path to the Java executable file. For example, if the current path is C:\WINDOWS\SYSTEM32, modify the path to C:\WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin.
Setting up Paths for Linux, UNIX, Solaris, FreeBSD
The PATH environment variable is set to point to the location where Java programs are installed. Refer to the Shell documentation if you encounter any issues during this process.
For example, if using bash as the shell, you need to add the following line at the end of the path:
.bashrc: export PATH = /path/to/java:$PATH
Popular Java Text Editors
After setting up the Java programming environment, to write Java programs, you will need to use a text editor. There are various text editors available in the market for you to choose from. Here are some of the most popular Java text editors you can consider:
- Notepad: On Windows, you can use simple text editors like Notepad or TextPad.
Download TextPad to your computer and install it here: Download TextPad
- NetBeans: Java open-source and free IDE.
Download NetBeans to your computer and install it here: Download NetBeans IDE
- Eclipse: Java IDE developed by the open-source Eclipse community: Download Eclipse
Here, Mytour has just guided you on how to set up the Java programming environment. If you are using an operating system like Ubuntu Linux, you can also easily install Java on Ubuntu Linux following Mytour's instructions. In the upcoming articles, Mytour will introduce you to the basic syntax of Java, classes and objects in Java, Java variable declarations, ...
