> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/core/get-started/faq/java-or-javac-unrecognized.md).

# Why is java or javac unrecognized as commands?

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

This can happen for a few reasons:

* You have not correctly added the jdk to your `path` environment variable. Ensure that you have done so correctly.
* The Command Prompt or CLI service was open from before you added the `jdk` to your `path` environment variable. You simply need to restart this service.
* You have not installed a version of java that is compatible with your machine. Double check that you have the right bitness (x64 or x86).
* You have a Java installation but have not installed the JDK correctly, in which case `javac` would not be recognized. You can find the links to it in the above FAQ. If properly installed, you should be able to find a `jdk` folder inside your Java installation folder (`C:\Program Files (x86)\Java\`)

When you've tried all these fixes, verify your installation by opening a Command Prompt and running:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
java --version
```

{% endcode %}
{% endtab %}
{% endtabs %}

and

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
javac
```

{% endcode %}
{% endtab %}
{% endtabs %}

The first should return a valid version number and the second should give a list of options and flags.

If you still have any issues running java commands, set the `JAVA_HOME` environment variable.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/core/get-started/faq/java-or-javac-unrecognized.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
