JAVA Coe Won't Run

Many users, especially beginners complain that they are not able to run their java code. Java installation was successful and everything else seems to be fine, still the java code won’t run! This is frustrating.. Many of them, end up quitting to proceed further with Java and Selenium. if you are facing this issue and you landed up to this post, you are right, you just have missed one small pre-requisite. In this quick read post, we will see step by resolution for this.

Basically, once you install JDK on your machine, you get a Successful installation message upon completion. But that’s not it, before proceeding further you need to take the very first step.


The Pre-requisite

The step you are missing post installation is to configure the Java Home. follow the steps below

  1. Go to computer, right click properties
  2. Click on “Advanced System Settings”


  1. Click on” Environment Variable” Button


  1. Click “New” to add new variable under “System Variable”
  2. Add Variable Name as “JAVA_HOME”
  3. Variable Value as path of installation folder for JDK


  1. Find System Variable as “Path” and click on Edit button
  2. Click on New button and add below path


(do not change any other value under this)


That’s it! Your Java is configured. Now you can run your programs. Try it.

Just to verify, check java version in command prompt.


See also  UFT Patch Updates - UFT 14.03


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.