# 2.1. Install Java JDK

1. Cài đặt [Java JDK](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html) 11 trở lên

&#x20;  2\. Thiết lập biến môi trường **JAVA\_HOME**

* Cho [Windows 7](https://medium.com/@tushar0618/setting-java-home-variable-on-windows-7-bab344b6f3c4)
* Cho [Windows 10](https://mkyong.com/java/how-to-set-java_home-on-windows-10/)
* Cho [Linux](https://www.baeldung.com/linux/path-variable)
* Cho MAC OS

  From OS X 10.5, Apple introduced a command line tool (/usr/libexec/java\_home) which dynamically finds the top Java version specified in Java Preferences for the current user.

  Open \~/.bash\_profile in any text editor and add:

```
    Save and close the file.

    Open a Terminal and run the source command to apply the changes:

    $ source ~/.bash_profile

    Now we can check the value of the JAVA_HOME variable:

    $ echo $JAVA_HOME

    The result should be the path to the JDK installation:
  
    $ /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tvn.gitbook.io/selenium-java/setup-new-maven-project/install-java-jdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
