UrbanPro
true

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How To Setup development Environment Of Java?

Amit K.
28/06/2017 0 0

After installation of JAVA, we need to setup 2 environment variables. First one is JAVA_HOME and second is Path.

Below steps to set up Java environment to compile & execute Java programs from command line Or any editor (like Eclipse, NetBeans, etc)

  • Download latest version of JDK (as per bit of OS i.e. 32-bit OR 64-bit OS) from Oracle site.
  • Install its both components JDK & JRE inside same folder location (recommended).
    After installation, 2 sub-folders are created inside Java Folder. One for JDK (Java Development Kit) and other for JRE (Java Runtime Environment).
  • Setup JAVA_HOME Environment variable

JAVA_HOME is globally accepted standard variable in JAVA world which represents the JDK location. This variable is internally used by other JAVA based tools / software’s like Eclipse, NetBeans, Tomcat, JBoss, etc to identify the JDK location during start-up / execution of that software’s / tools. 

Let’s assume JDK is installed at D:\Program Files\Java\jdk1.8.0_91 location and follow below steps to setup JAVA_HOME environment variable:

Right Click on This PC -> Properties -> Advanced System Settings ->Advanced tab -> Environment Variables button -> Click on New Button to create a User Variable the provide Variable name as

JAVA_HOME and Variable value as D:\Program Files\Java\jdk1.8.0_91 (this location is depend on where You installed your JAVA) -> OK

  • Setup PATH Environment variable

JAVA program compile by using javac command (an executable file inside bin folder) and run by using java command (an executable file inside bin folder) and these files reside inside Java\JDK\bin directory.

 PATH is globally accepted standard variable in Windows OS which have locations of all executable files (like .exe OR .bat). If we execute any command using Command Line, Windows OS searching these commands under the path specified inside PATH environment variable.

That’s why we need to setup JAVA executable folder location (i.e. bin folder) along with PATH environment variable so that we can compile & run our JAVA programs by residing on any drive (C: OR D:) from command prompt (CMD).

 If we don’t setup JAVA executable folder location inside PATH environment variable then we always get below error while compiling or execution our JAVA programs other than Java\bin location.

NOTE: This error is not given by JAVA whereas this is OS error. Whenever you try to execute any unknown command from OS then OS raise this error.

Let’s assume Executable files reside inside JDK is at D:\Program Files\Java\jdk1.8.0_91\bin location and follow below steps to setup PATH environment variable:

Right Click on This PC -> Properties -> Advanced System Settings ->Advanced tab -> Environment Variables button -> Click on New Button to create a User Variable the provide Variable name as PATH and Variable value as %JAVA_HOME%/bin; %PATH% (this location is depend on where You installed your Java) -> OK

%JAVA_HOME% is used to get the value of JAVA_HOME and append older PATH into PATH environment variable. 

  • Check whether we can compile / execute our JAVA programs using Command prompt or not:
    • Open Command Prompt
    • Type command Java – version
0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

If x >= y And y>1 Then The Value Of Eexpression Log Base x( x/y) + Log Base y ( y/x) Can Never Be a) -1, b) - 0.5, c) 0, d) 1
Question: If x >= y and y>1 the the value of expression log base x( x / y) + log base y ( y / x) can never be a) -1 b) -0.5 c) 0 d) 1 Answer: Expression becomes 2-(x+1/x) where x is logx base...

Key to success in exams
key to success in any exam is well planned studying and repeated revision.
N

Namratha

0 0
0

Numbers
Natural numbers N = {1, 2, 3, 4...........+∞} Integers Z = {-∞........,-3, -2, -1, 0, 1, 2, 3, 4..........+∞} Positive integers Z+ ={1, 2, 3, 4, ..........+∞} Negative integers...

How to create Rest web services in Java
Web services are web application components that lets two different applications to communicate over the network.Let if an application which in written java provides web services can be communicated through...

Science
Science is nothing but the ways you live in day to day life and the ways you will simplify your life Science students are having a lot of demand in any country for research Biology makes the humans learn...

Sai Vinay Boddu

0 0
0
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more