Thursday, 25 June 2015

How to setup JAVA Environment in Windows?


Hello Friends!!!
   Today I'm writing on how to setup Java Environment??? There are many CSE and IT students who have this question, this is for the beginners. First you need to download JDK . U'll get it from oracle's official website.Click here to download it. 
jdk_oracle_free_download

   Click the Download button under JDK, and by now you will be on the downloads page.
jdk_oracle_free_download

   There is a Radio button saying "Accept License agreement", accept it and choose the JDK for your device, if it is windows 32-bit computer then download Windows X86 vesion and if it is windows 64-bit computer download X64 version.
   Install the  exe file that has been downloaded. Accept all defaults.
   Though we can install JDK at any location we wish, by default it will certainly be installed to the folder 
C:\Program Files\Java
And yes, JDK is installed on your system. 

   Now we need to set PATH for JDK , that's what we call  setting Environment variables for Java.

   Right click on My Computer> properties
   Click on the Advanced System Settings tab
JAVA ENVIRONMENT VARIABLES
 A System Properties window appears.

In the Advanced Tab, look for the button "Environment Variables"

click on new button under the user's variables section, and add the following values:
copy the path of JDK,JRE and PATH(contains path of jdk\bin)as shown below:

SETTING JRE_HOME VARIABLE IN JAVA

SETTING PATH VARIABLE IN JAVAJAVA_HOME ENVIRONMET VARIABLES


So, now Java programs are ready to run on your machine. You may write the code in any text editor like Notepad ++ , Notepad, Wordpad or an IDE like Eclipse or Netbeans.
Here is the link to download Netbeans , its for free!!!!

Install Netbeans and their you go, the advantage of using IDE is to write programs easily as it has the whole runtime environment, you write, debug and run the code there itself and no need to go to the CMD to run the java classes individually using the javac command.

In Netbeans, we can create a whole project containing classes, interfaces, package, applet, servlet, and much more and run it. In my next post i will be writing on how to setup Tomcat server, to run Java web applications? Hope u like this post. Have a nice day :)

No comments:

Post a Comment