Understanding your current Java Development Kit (JDK) version is a fundamental step for any developer working with Java applications, especially within the rapidly evolving fields of drone technology, flight systems, and advanced imaging. Whether you’re deploying custom flight control software, integrating AI-driven mapping solutions, or developing firmware for advanced gimbal cameras, the correct Java version ensures compatibility, performance, and access to the latest features. This guide will walk you through the various methods to identify your installed Java version, catering to different operating systems and use cases relevant to the tech and innovation sector.

Verifying Java Version via Command Line
The most common and often the quickest way to determine your Java version is through the command line interface (CLI). This method is universally applicable across Windows, macOS, and Linux and is essential for scripting and automated deployments.
On Windows
-
Open Command Prompt or PowerShell: Search for “cmd” or “PowerShell” in the Windows search bar and open the application.
-
Execute the Java Version Command: Type the following command and press Enter:
bash
java -version
-
Interpret the Output: The output will display information about your Java Runtime Environment (JRE) or JDK. Look for a line that starts with “java version” followed by a numerical string. For example,
java version "1.8.0_291"indicates Java SE 8, Update 291. Newer versions might be displayed asopenjdk version "11.0.12" 2021-07-20orjava version "17.0.1" 2021-10-19.- Understanding the Output:
- The first number (e.g., 1.8, 11, 17) usually corresponds to the major Java SE version.
- The subsequent numbers indicate minor updates and build information.
- If you see “OpenJDK,” it means you are using an open-source implementation of the Java Platform, Standard Edition, which is fully compatible with Oracle’s JDK.
- Understanding the Output:
On macOS and Linux
-
Open Terminal: You can find the Terminal application in your Applications folder (Utilities) or by searching using Spotlight (Command + Space and type “Terminal”).
-
Execute the Java Version Command: Similar to Windows, type the following command and press Enter:
bash
java -version
-
Interpret the Output: The output format is generally the same as on Windows. You will see details about the installed Java version, including “java version” or “openjdk version” followed by the specific version number.
- Troubleshooting: If the command
java -versionreturns an error like “command not found,” it indicates that Java is either not installed or its installation directory is not correctly added to your system’s PATH environment variable. This is a crucial step when setting up development environments for drone firmware or complex sensor integration.
- Troubleshooting: If the command
Identifying the JDK vs. JRE
It’s important to distinguish between the Java Runtime Environment (JRE) and the Java Development Kit (JDK).
- JRE: The JRE is what allows you to run Java applications. It includes the Java Virtual Machine (JVM), core libraries, and other components necessary for execution. If you only need to run existing Java programs, you likely only have a JRE installed.
- JDK: The JDK includes everything in the JRE plus development tools such as compilers (
javac), debuggers (jdb), and other utilities needed to write, compile, and debug Java code. Developers working on new applications, especially those involving advanced features like AI for autonomous flight or sophisticated sensor fusion algorithms for navigation, will require the JDK.
If you execute java -version and get a version number, you are seeing the version of the JRE that is currently active on your system. To check for the JDK, you can use a different command.
Checking for the JDK
If you have the JDK installed, you can verify its version using the javac command:
-
Open your command-line interface (Command Prompt, PowerShell, or Terminal).
-
Execute the Java Compiler Version Command: Type the following command and press Enter:
bash
javac -version
-
Interpret the Output: This command will display the version of the Java compiler (
javac). For example,javac 11.0.12orjavac 17.0.1.- Significance: If
javac -versionworks, it confirms that you have the JDK installed and that itsbindirectory is correctly added to your system’s PATH. This is vital for any development tasks. Ifjava -versionshows a version butjavac -versiondoes not, you likely have a JRE installed but not the full JDK.
- Significance: If
Environment Variables and PATH Configuration
The ability to run java -version or javac -version directly from any directory relies on the Java installation being correctly configured in your system’s environment variables, specifically the PATH variable.
Understanding the PATH Variable
The PATH is an environment variable that tells your operating system where to look for executable files. When you type a command like java or javac, the OS searches through the directories listed in PATH to find the corresponding executable.
![]()
- On Windows:
- Search for “environment variables” and select “Edit the system environment variables.”
- In the System Properties window, click the “Environment Variables…” button.
- Under “System variables” or “User variables,” find the
Pathvariable, select it, and click “Edit…”. - You should see entries pointing to the
bindirectory of your Java installation (e.g.,C:Program FilesJavajdk-17.0.1bin).
- On macOS and Linux:
- The configuration is typically managed in shell profile files like
~/.bash_profile,~/.zshrc, or~/.profile. - You can view these files using a text editor or
catcommand. For example, to view your.zshrcfile:cat ~/.zshrc. - Look for lines that export the
JAVA_HOMEvariable and add the$JAVA_HOME/bindirectory to thePATH.
- The configuration is typically managed in shell profile files like
Setting JAVA_HOME (Recommended)
It’s good practice to set the JAVA_HOME environment variable, which points to the root directory of your JDK installation. Many Java-based tools and build systems (like Maven and Gradle, which are common in drone software development) rely on JAVA_HOME to locate the correct JDK.
- On Windows:
- Follow steps 1-3 above for editing environment variables.
- Click “New…” under “System variables.”
- Enter
JAVA_HOMEfor the variable name. - For the variable value, enter the path to your JDK installation’s root directory (e.g.,
C:Program FilesJavajdk-17.0.1). - Then, edit the
Pathvariable and add%JAVA_HOME%binto the list of directories.
- On macOS and Linux:
- Open your shell profile file (e.g.,
~/.zshrc). - Add lines similar to these:
bash
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home # Adjust path as needed
export PATH=$JAVA_HOME/bin:$PATH
- Save the file and reload your shell configuration (e.g.,
source ~/.zshrc).
- Open your shell profile file (e.g.,
After setting JAVA_HOME and updating PATH, close and reopen your command-line terminal for the changes to take effect. Then, re-run java -version and javac -version to confirm.
Graphical User Interface (GUI) Methods
While the command line is the most robust method, some operating systems offer GUI-based ways to manage software, which can indirectly help you identify your Java installation.
On Windows
- Control Panel (Programs and Features):
- Open the Control Panel.
- Go to “Programs” and then “Programs and Features.”
- Look for entries related to “Java,” “Oracle Java,” or “OpenJDK.” The listed version number will often indicate the installed Java version. This method usually shows installed JREs and sometimes JDKs.
- Java Control Panel:
- Search for “Configure Java” in the Windows search bar and open the Java Control Panel.
- Go to the “About” tab. This window will explicitly state the version of the Java Runtime Environment that is currently active and being used by applications.
On macOS
- Applications Folder: While not a direct version check, you can navigate to your Applications folder and look for Java-related applications or folders. However, the most reliable method remains the Terminal.
- System Preferences (Less Common for Java Versions): In older macOS versions or specific Java installations, Java settings might have been accessible through System Preferences, but this is less common with modern JDK/JRE installations.
IDE and Build Tool Integration
If you are actively developing with Java for projects involving drone technology, flight systems, or imaging, your Integrated Development Environment (IDE) or build tools will also provide clear indicators of the Java version being used.
Integrated Development Environments (IDEs)
Popular Java IDEs like:
- IntelliJ IDEA: You can configure the Project SDK under
File > Project Structure > Project. This setting shows the JDK version used for the current project. - Eclipse: Go to
Window > Preferences > Java > Installed JREs. This will list all detected JREs and JDKs and allow you to select the one for your workspace. - VS Code: If you’re using VS Code with Java extensions, you can configure the Java runtime in your workspace settings (
.vscode/settings.json) or by using the Java Extension Pack’s commands to select the correct JDK.
These IDE settings are crucial for ensuring that your code compiles and runs correctly against the intended Java version, especially when dealing with platform-specific libraries or APIs used in advanced drone functionalities.
Build Tools (Maven, Gradle)
When using build automation tools like Maven or Gradle for managing dependencies and building your Java projects (common for complex drone software), their configurations specify the Java version.
- Maven: In your
pom.xmlfile, themaven-compiler-pluginoften has configurations forsourceandtargetversions, e.g.:
xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
This indicates that Maven is configured to compile against Java 11. Maven also respects theJAVA_HOMEenvironment variable. - Gradle: In your
build.gradlefile, you might see configurations like:
gradle
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
Or, you might configure the JDK toolchain:
gradle
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
Gradle also relies onJAVA_HOMEor explicitly configured JDKs.
Verifying these configurations within your build scripts ensures that the build process uses the correct Java version, which is paramount for consistent and reliable deployment of your drone or flight system software.

Conclusion
Whether you’re a seasoned developer building sophisticated AI for autonomous drone navigation, integrating real-time imaging systems, or simply ensuring your development environment is up-to-date, knowing your Java version is a foundational skill. The command-line interface (java -version and javac -version) remains the most direct and universally applicable method. Supplementing this with checks of your environment variables (PATH, JAVA_HOME) and your development tools (IDEs, build scripts) provides a comprehensive understanding of your Java setup. This knowledge is critical for maintaining compatibility, leveraging new language features, and ensuring the robust performance of your Java-based applications in the dynamic world of aviation technology and beyond.
