Translate

Monday, February 11, 2013

Setting up JAVA_HOME and PATH environment variables in Windows 7

I recently had to do some load testing stuff using the Apache Jmeter tool.Its a java based load testing tool.So for this i was required to install JDK on my Win7 box.Installing JDK was easy.But that was not all.
Since i am not much into programming in Java (am a .NET enthusiast fyi),so i was told by one of  my friends to set the environment variable to enable java to execute jar files for the load testing tool.Well it was not a tough job but took some time for me to figure it out.So here's a short and smart tutorial to get your box Java ready.

Step 1: Where's my JDK installation

The first step would be to locate your jdk's installation folder on your hard drive.Mine was C:\Java.This is an important step.You need to know the jdk installation folder location.This will be required later.



Step 2:  Setting up environment variable.Where do i begin?

To set up the environment variable,right click on the 'My Computer'(or 'Computer' icon/menu item in Win 7)



This would show up the following screen.


Notice the 'Advanced system settings' on left!! Click on it.
This would throw up a new mini-window with the 'System properties' options.


Now locate and click the button which says 'Environment Variables'.
This shows up the EV window where you have a couple of system related variables pre-defined.



Step 3: Setting up things

Now,our concern is to set up two new variables namely JAVA_HOME and PATH.We define the variables individually.Click on the 'New' button(Note there are two buttons with the text New.Click on the highlighted one in the image.)

This throws up a small-window with couple of textboxes. Here is where you specify the two attributes of your variable,the Variable Name and Variable value. In the Variable Name field you need to specify the name of the variable(JAVA_HOME or PATH in our case) and in the Variable value field,you need to specify the pathname.

For JAVA_HOME put in these parameter values.Note: The Variable value should contain the location of the JDK folder on your system.




For PATH put in these values.Note: The Variable value should contain the location of the bin folder of the JDK installation on your system.



Once done, you can see these environment variables in the listing. But we are not done yet.


Step 4: Some more changes

We just specified the environment variables.But the job is not over yet.We need to edit some 'System Variables' for the JAVA_HOME variable.To do so,highlight the JAVA_HOME variable by clicking on it.Once highlighted,you can see the various system variables related to our variable.


Now,we need to change the 'Path' variable(highlighted in the image above).Click on it and then click on 'Edit'.

This throws up the 'Edit System Variable' mini-window.Now add the highlighted portion in the image shown below at the end.(Don't forget to put in the semi-colon).


Once done,close everything and restart your system for the changes to come into effect.Once restarted,go to the command-line(cmd.exe) and type-in the following commands: java and javac 


You can see the version of Java installed on your system.This indicates that you have set the 'environment variables' successfully on your system.

24 comments:

#gone said...

True love doesn't happen right away; it's an ever-growing process. It develops after you've gone through many ups and downs, when you've suffered together, cried together, laughed together. See the link below for more info.

#gone
www.inspgift.com

Unknown said...

Thanks for sharing your views dear.This is very usefull for me and to read about the How to setup the environment for JMeter

Unknown said...

for Video Solution, Youtube Link

vigneswaran said...

We share perfect explanation about java programming code and it's example.In this information very useful to me.Thanks for such a valuable information.
java training in chennai | java training

blackkutty said...

culminate clarification about java programming .its exceptionally useful.thanks for your significant data
Latest Updates

sai said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
Click here:
python training in marathahalli
Click here:
python training in btm

ummayasri said...

Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
Blueprism training in annanagar

Blueprism training in velachery

Blueprism training in marathahalli

sakthi said...

This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 

best rpa training in chennai |
rpa training in chennai |
rpa training in bangalore
rpa training in pune | rpa online training

sunshineprofe said...

Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
best safety course in chennai

Unknown said...

Read all the information that i've given in above article. It'll give u the whole idea about it.

Data Science course in kalyan nagar | Data Science course in OMR
Data Science course in chennai | Data science course in velachery
Data science course in jaya nagar | Data science training in tambaram

Anonymous said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

tamilsasi said...


It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

Selenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training

sasitamil said...

Your story is truly inspirational and I have learned a lot from your blog. Much appreciated.
angularjs online training

apache spark online training

informatica mdm online training

devops online training

aws online training

user123 said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
Data Science Training in Chennai
Robotic Process Automation Training in Chennai
Cloud Computing Training in Chennai
Data Warehousing Training in Chennai
Dev Ops Training in Chennai

user123 said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
Data Science Training in Chennai
Robotic Process Automation Training in Chennai
Cloud Computing Training in Chennai
Data Warehousing Training in Chennai
Dev Ops Training in Chennai

user123 said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
Check Matlab Training @ Chennai
Check C C++ Training @ Chennai

ranjitham kannan said...

I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
Best PHP Training Institute in Chennai|PHP Course in chennai

Best .Net Training Institute in Chennai
Powerbi Training in Chennai
R Programming Training in Chennai
Javascript Training in Chennai

Softgen Infotech said...

Such a great word which you use in your article and article is amazing knowledge. thank you for sharing it.

Learn Best Microsoft Training in Bangalore from Experts. Softgen Infotech offers the Best Microsoft Training Course.100% Placement Assistance, Live Classroom Sessions, Only Technical Profiles, 24x7 Lab Infrastructure Support.

Jenifer said...

Great learning experience with proficient trainers in Informatica. Flexible timings with hands on experience with real time scenarios.

microsoft training in bangalore

microsoft training institutes in bangalore

microsoft course content

microsoft training centres in bangalore

microsoft course syllabus

microsoft training

Jenifer said...

I wanted to build my career in IT. Hats-off to the trainers at the training centre. They provide complete assistance and always ready to guide.

microsoft training and placement support in bangalore

microsoft training free demo class

microsoft placement bangalore

microsoft online training

microsoft classroom training

microsoft training with lab facilities

microsoft training with certified and experienced trainers


aarthi said...

Great effort.Thank you for the blog. Java training in Chennai | Certification | Online Course Training | Java training in Bangalore | Certification | Online Course Training | Java training in Hyderabad | Certification | Online Course Training | Java training in Coimbatore | Certification | Online Course Training | Java training in Online | Certification | Online Course Training

Prwatech said...

Excellent and very cool idea and great content of different kinds of the valuable information's.

Python Training in Pune
Python Training Institute in Pune

lakshmibhucynix said...

nice post..
data scientist course in hyderabad
data science training india

Pranisha said...

Quick up the best offer of AWS DevOps Training in Chennai from Infycle Technologies, Excellent software training in Chennai. A massive place to learn other technical courses like Power BI, Cyber Security, Graphic Design and Animation, Block Security, Java, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with outstanding training with experienced trainers with a fresh environment with 100+ Live Practical Sessions and Real-Time scenario after the finalisation of the course the trainee will able to get through the interview in top MNC’s with an amazing package for more enquiry approach us on 7504633633, 7502633633