Not a few users who struggle to install java in linux, but still lack experience in using linux, java installation on linux is not too friendly, in contrast with the installation of the windows are adorned with a graphical user interface. But it still can not make the reason, we must try to succeed.
Please download the oracle site do not forget to select the version of Linux. Once successfully downloaded, please follow the ways below:
- Save the java program has been downloaded in the home directory of the user who wants to install java, here I use the user who called rdp, so his home directory like this / home / rdp /.
- Open the console or terminal to execute a binary program that has been downloaded.Type the following command on the console screen: ./jdk-6u10-linux-i586.bin. Customize the Java version that you downloaded. Then the screen console will be like the picture below
- After we execute, it will show the license of java. Press enter and hold, if you want to read the full license, otherwise you can press q. Display the picture as below:
- After you read the license, then the binary program will be extracted into the directory / home / rdp /. Display the picture as below
- After extracting, then the console will display the screen as shown below:
- Time we set the PATH, so that binary Java programs can be executed by the user rdp.Open a text editor in Linux version you use, such as: vim, kwrite, kate, pico, joe, mc.After you open a text editor, type the command like this: export PATH = $ PATH: / home/rdp/jdk1.6.0_10/bin. Adjust the Java version you use. Display the picture as shown below:
- Logout or restart so that the PATH setting that we do can function
- After a testing time for us to log out, whether we are setting the correct PATH. Open a console or terminal, then type the command: javac-version. If the PATH setting is correct, then it will output the version of Java you use.
Thus a brief article about installing java on linux operating system, which still often complain by beginners during Java installation. Hopefully useful and not give in to learn Java programming. 😀