java tutorial - Install Java | Installation and configuration on a computer - java programming - learn java - java basics - java for beginners
- If you still want to do a complete installation of the environment for the Java programming language, this section will help you download and install Java on your computer.
- Follow these steps to create an environment. Java SE is freely available under the link download Java . Therefore, you download to the computer in accordance with its version of the operating system.
- Follow the instructions to download and then run .ehe and start installing Java on your computer. Once you're done, you'll need to start configuring the environment variable, pointing to the correct installation directory.
Installation on Windows 2000 / XP
Suppose that the installation of Java on Windows was performed in the folder " C:\Program Files\Java directory\JDK ":
- Right-click on "My Computer" and select "Properties."
- Click the "Environment Variables" button and the "Advanced" tab.
- Now, change the variable "PATH" (path) so that it also contains the path to the executable file. For example, if the path is currently set to " C:\WINDOWS\system32", change it as follows: from " C:\WINDOWS\system32" to " C:\Program Files\Java\JDK\Bin ".
Installing on Windows 95/98/ME
Suppose that the installation of Java on the computer was performed in the " C:\Program Files\Java directory\JDK ":
- Edit the file " C:\ autoexec.bat " and add the following line at the end: " SET PATH =% PATH%; C:\Program Files\Java\JDK\Bin ".
Installation on Linux, UNIX, Solaris, FreeBSD
- Set the environment variable "PATH" so that it contains the path to the files that were previously installed on the computer. Refer to your shell documentation if you have a problem with the installation.
- For example, if you are working in a shell, you must add the following line at the end of " .bashrc: export PATH = / path / to / java: $ PATH ".
Popular editors for Java
Now, after installation, you need a text editor for Java to write the program code. There are many complex development environments available on the market. But for now, you can consider the following:
- Notepad : on a Windows machine, you can use any simple text editor, such as Notepad, TextPad.
- Netbeans : is an open source Java development environment and free, which you can download from www.netbeans.org (I recommend you to use this free code editor in the future).
- Eclipse : Also a development environment developed by Eclipse with open source, which you can download from www.eclipse.org
In the following, we'll look at how to write and run your first program, and the basic syntax of the language needed to develop the application.