Showing posts with label how to install java?. Show all posts
Showing posts with label how to install java?. Show all posts

How to install JAVA on LINUX ?



Download the JDK

Select the right download. Under the "Product/File Description" you should pick your corresponding Linux option. For example, if you're running Linux x86 (32-bit), you need to choose the corresponding “*.tar.gz” version.

Download the file as a .gz. Save it to your GNU/Linux machine.

Switch to the directory where you saved the file. You do not need to be a root and only must have the write access to the folder where you wish to install Java. If your administrator is not supportive, you may need to place Java into your home folder or (even better) on some shared network location

Decompress the file. For example, you could do this in your home folder. Decompressing will create a folder called “jdk1.7.0_09”. Java is now installed.
  • The installed Java jre is rather independent and can be easily moved into another place just by copying all its files.
  • You can install multiple different jre's this way: they coexist together and can be used if some software requires the older version to run.
Launch Java. The Java executable you need to launch is located in a subfolder, called "bin." This way of installation will not configure a default Java command for you — you must do this manually or always include the full path in your startup script.

How to install java SDK or JDK?



The Java Software Development Kit (Java SDK or JDK) is an application created by Sun Microsystems to create and modify Java programs. This is where to start if you would like to start programming in Java.

1.     Download the latest version of the Java JDK from Sun Microsystems.
2.      Double-click on the install file and it should open an installer
3.      Click next, then read and accept the license
4.      On the next screen you will encounter some options. Just leave these alone and click next unless you know what you are doing. (Because this is being read it is assumed that you do not.)
5.     The next page you encounter should install (and in some cases download) the Java Development Kit.
6.      After the installer is finished, open run by clicking Start > Run... or by typing Windows Key + R.
7.      In the text box, type "cmd" and click "OK".
8.      A simple window should be opened with a black background and a text prompt. This is called the "Command Prompt." My command prompt background is red, but it could really be any color.
9.      After focusing the window, type "javac" and press enter. If the prompt returns something along the lines of: "'javac' is not recognized as an internal or external command, operable program or batch file" then continue with the next step. If it shows many more options and lines, skip to step 15.
10.           Open the properties of "My Computer" by either right-clicking the icon on the desktop or right-clicking Start > My Computer. When the pop up menu opens, scroll to the bottom and select "Properties".
11.           This should open a window named "System Properties". Click on the "Advanced" tab and then click "Environment Variables".
12.           Next, another window opens with a lot of confusing sentences and letters. Double-click on the "Path" variable on either of the option boxes. It is recommended to edit the variable in the box "User variables for (your username)".
13.           Once the variable is opened, a text box in yet another window appears. Careful not to delete anything in this box. At the end of the text box, add a semi-colon if there is not one already, and add "C:\Program Files\Java\jdk1.6.0\bin" to the text box. This is assuming you did not change the file path of the installation.
14.           Click "Apply" and "OK" to all the windows you have just opened. Open the command prompt again, while following steps 6-9 to see if that "javac" command works.
15.           Congratulations! You have taken your first step to starting Java programming.
  • If you would like to change the install path, this would be done by clicking the "Change..." button on the page after the license agreement. Make sure to save the new install path if you do this.
  • If you are still getting the "javac is not recognized..." message after changing the Path variable, you may have to reboot your computer before the change takes effect.
  • There may not already be a variable named "Path" in the list of variables for your user. You can make one by clicking "new" and just adding the path to the java installation as detailed above.

HOW TO INSTALL JAVA ?




Download a JRE executable file from the (Sun Microsystems) Java website.

Double click on the downloaded file. The installer will open.

After the installer finishes loading, read and accept the license agreement. For most people the typical install will be fine.

The JRE installer will do the rest.

When the installer is finished, click Finish. Congrats, JRE is now installed.

For more information, view the install guide that Sun Microsystems has approved.