> For the complete documentation index, see [llms.txt](https://n-saikiran.gitbook.io/selenium-2-web-driver-basics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://n-saikiran.gitbook.io/selenium-2-web-driver-basics/1.-pre-requisites/1.2-setting-classpath-for-java.md).

# 1.2 Setting classpath for Java

**Setting Java Path on Windows 7/8.1/10**

* Select Computer from the Start menu
* Choose System Properties from the context menu
* Click Advanced system settings --> Advanced tab
* Click on Environment Variables, under System Variables, find **PATH,** and click on it.
* In the Edit windows, modify **PATH** by adding the location of the class to the value for **PATH**.
* If you do not have the item **PATH**, you may select to add a new variable and add **PATH** as the name and the location of the class as the value.
* Reopen Command prompt window, and run your java code.

**Is Java installed properly?**

You can check if you have installed Java correctly by:

• Running the command java -version from the command line.When you enter the following codes into your command line:

* **javac**&#x20;
  * [ ] If you receive a message that stating that ’javac’ is not recognized... then you do not have Java class path installed properly.
* **java**
  * [ ] If you receive a message that stating that ’java’ is not recognized... then you do not have Java pathinstalled properly
* **java -version**

If you receive a message that stating that ’java’ is not recognized... then you do not have Java installed properly. If you have Java installed then running the command java -version will show the version number of the Java installation.
