JDK installation on Windows Server 2016
Enjoying this content? Subscribe to the Channel!
Mastering Java: A Step-by-Step Guide to JDK Installation on Windows Server 2016
Welcome to Darren’s Tech Tutorials!
Hey there, tech enthusiasts! Darren here, and today we’re tackling a foundational task crucial for any serious development environment: installing the Java Development Kit (JDK).
Whether you’re setting up a new application server, running complex middleware, or just starting your journey with Java programming, you need the JDK installed and configured correctly. While this tutorial focuses specifically on Windows Server 2016, the great news is that these steps are applicable across most modern Windows operating systems.
Let’s dive in and get your server ready for Java development!
Why Install the JDK?
The JDK is more than just Java itself; it’s the complete package that allows you to write, compile, and run Java applications. It includes the compiler, the JRE (Java Runtime Environment), and essential development tools. For a Windows Server environment, having the JDK is necessary for hosting any Java-based web application or enterprise system.
Step 1: Downloading the Java JDK from Oracle
The first step requires us to navigate to the official source for the JDK: Oracle’s website. Since the licensing and versioning change periodically, ensure you are downloading a supported version.
- Open Your Browser: On your Windows Server 2016 machine, open a web browser (Edge, Chrome, or Firefox).
- Navigate to the Oracle Java Download Page: Search for “Oracle JDK download” or go directly to the official download center.
- Select the Correct Version: Choose the latest stable, supported version of the JDK (e.g., JDK 17, JDK 21, etc.).
- Choose the Windows Installer: Ensure you select the appropriate Windows installer package (usually the x64 Installer).
- Accept License and Download: Oracle typically requires you to accept the license agreement and sometimes log in with an Oracle account before the download begins. Save the installer executable file (it will look something like
jdk-xx_windows-x64_bin.exe) to a location you can easily access, such as your Downloads folder.
Step 2: Running the JDK Installation Wizard
Once the executable is downloaded, the installation process is straightforward, relying on the familiar Windows Server setup wizard.
- Launch the Installer: Double-click the downloaded
.exefile to start the installation wizard. You may need to grant administrator permissions. - Welcome Screen: Click Next on the initial welcome screen.
- Select Features (Optional): The wizard will show you the components being installed (Development Tools, Source Code, JRE). For a complete development environment, leave all options checked. Click Next.
- Choose Installation Path: This is an important step. By default, the JDK installs to a path like
C:\Program Files\Java\jdk-xx. We recommend keeping the default path unless you have specific organizational requirements to change it. Click Next to begin the installation. - Wait for Completion: The installation process is usually quite fast. Once the progress bar is complete, you will see a success message. Click Close or Finish.
Congratulations! The Java Development Kit is now installed on your Windows Server 2016.
Step 3: Verifying the Installation
Installation is only half the battle; we need to confirm that the JDK is properly recognized by the system. We have two primary ways to verify this.
A. Checking Installed Programs (The Visual Check)
This is the simplest way to confirm the files are present:
- Open the Control Panel.
- Navigate to Programs > Programs and Features (or simply “Add or remove programs”).
- Scroll through the list of installed applications. You should see an entry labeled “Java SE Development Kit [Version Number].”
B. Checking via Command Line (The Developer Check)
For developers, the most reliable verification is confirming that the java command is accessible from the command line.
-
Open the Command Prompt or PowerShell (Search for
cmdin the Start menu). -
Type the following command and press Enter:
java -version -
If the installation was successful, the terminal will display the installed Java version, including runtime and build information.
If you receive an error like ‘java is not recognized…’, this means the system’s Environment Variables (specifically the PATH) were not updated correctly. This is a common hiccup on Server installations, and you will need to manually add the bin directory of your new JDK installation to the System PATH variable. (We cover environment variables in depth in a separate tutorial!)
Conclusion and Next Steps
You’ve successfully downloaded, installed, and verified the Java Development Kit on your Windows Server 2016 machine. You are now equipped with the tools necessary to deploy and manage powerful Java applications!
Ready to put your new environment to the test? Now is the perfect time to start experimenting with those Java services you’ve been putting off!
If you found this guide helpful, don’t forget to Like this post and Subscribe to the Darren’s Tech Tutorials YouTube channel for more clear, accessible guides on development, networking, and server administration!
Happy coding!