75.9k views
4 votes
How to tell if you are running jdk or jre

User Pmfith
by
7.8k points

1 Answer

4 votes

Final answer:

In order to determine if you are running JDK or JRE, you can use the 'java -version' command in the command prompt or terminal, or check the 'JAVA_HOME' environment variable.

Step-by-step explanation:

In order to discern whether your system is equipped with JDK (Java Development Kit) or JRE (Java Runtime Environment), utilize the 'java -version' command in the command prompt or terminal.

If the output includes 'javac,' it indicates the presence of JDK.

Conversely, if 'javac' is absent but 'java' is present, it signifies the installation of JRE. An alternative method involves inspecting the environment variables on your computer.

Navigate to system properties or environment variables settings and examine the 'JAVA_HOME' variable.

If it points to a JDK installation directory, JDK is installed.

Contrarily, if it points to a JRE installation directory or is unset, you have JRE.

These diagnostic approaches empower users to identify their Java environment accurately, facilitating the appropriate configuration for development or runtime purposes.

User Idleberg
by
7.8k points