Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
For Java development, install a JDK, not a runtime-only package. The JDK includes the compiler, runtime, and tools that VS Code, Maven, Gradle, and other build systems need. At the time of the cited Oracle page’s 2026 update, JDK 25 is the newest Long-Term Support (LTS) release, while JDK 27 is the newest Java SE feature release. Choose a reputable distribution that matches your project’s requirements, make its home directory visible through JAVA_HOME and PATH, then verify both java and javac. VS Code can detect an existing JDK, download one through its Java tooling, or be pointed at several installed versions.
Do I need a JDK or a JRE?
Install the JDK. A JDK contains the Java runtime plus development tools such as javac, the Java compiler. A runtime-only installation can launch an application but cannot compile source code, so it does not meet the needs of a normal development workflow. Oracle’s installation guidance states: “To develop or run Java applications, download and install JDK.”
What the JDK provides
- Runtime: the components that execute compiled Java bytecode.
- Compiler:
javac, which turns.javasource files into class files. - Developer tools: utilities used by debuggers, documentation generators, profilers, build tools, and IDE integrations.
Installing a JDK also lets you run applications, so a separate JRE is unnecessary for a developer machine. If you only consume a packaged application on a locked-down device, its vendor may bundle or request a runtime, but that is a different use case from writing Java.
How can I tell whether an existing installation is a JDK?
Open a terminal and run:
java -version
javac -version
If java works but javac is “not recognized,” “command not found,” or otherwise missing, the active installation is either runtime-only or the JDK’s bin directory is not on PATH. Correct the installation or environment variables before configuring VS Code.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Which Java version should I install, and what does LTS mean?
For a new learner without a project constraint, use the current LTS line. The Oracle downloads page identified JDK 25 as the latest LTS release and JDK 27 as the latest Java SE release at the page state cited in 2026. Those labels are time-sensitive: Java releases continue, so check the project’s required version and the vendor’s current download page when you install.
LTS versus a feature release
An LTS release is maintained as a longer-lived baseline and is commonly selected for teaching, production services, and projects that prefer fewer upgrade events. A feature release arrives sooner and can expose newer language, library, or virtual-machine capabilities, but its support window and upgrade cadence are shorter than an LTS baseline. “Latest” therefore answers two different questions: JDK 25 is the current long-term choice in the cited information, while JDK 27 is the newest feature release there.
Let the project decide when it already has a requirement
Do not replace a project’s declared version simply because a newer JDK exists. Maven and Gradle builds may set a source or toolchain level, and a framework or deployment platform may support only particular Java versions. Read the project’s build file, contribution guide, container image, or CI configuration first. If it explicitly requires an older release, install that JDK alongside your preferred LTS and select the required one for that project.
Compatibility checks before downloading
- Confirm the operating system: Windows, macOS, or Linux.
- Confirm the processor architecture, such as x64, ARM64, or another architecture offered by the distribution.
- Check whether the project needs a specific major version, vendor build, or security-update level.
- Check whether your organization has a support or licensing policy that limits distributions.
Do not treat “Java 25” as a universal promise that every library supports it. A library can lag a new release, while another project can require an older baseline even when your computer can run the latest JDK.
Which JDK distribution should I choose?
No single vendor is mandatory. Choose a reputable OpenJDK distribution that supplies your required version, operating system, architecture, update policy, and project compatibility. Microsoft’s Windows guidance says Microsoft Build of OpenJDK or Eclipse Temurin are good choices for most developers, while VS Code documents a broader set of available distributions.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Distributions VS Code can work with
| Distribution | When it may fit | What to verify |
|---|---|---|
| Eclipse Temurin | A broadly used OpenJDK build and a practical default for many learners. | Available version, architecture, installer format, and update policy for your operating system. |
| Microsoft Build of OpenJDK | A straightforward choice on Windows and one Microsoft recommends for most developers. | Supported platforms, release schedule, and the version your project targets. |
| Oracle JDK | Useful when a project, organization, or support agreement specifically calls for it. | Current licensing, update terms, and whether the terms fit your intended use. |
| Amazon Corretto | An OpenJDK distribution to consider when its supported versions and platforms match your deployment. | Security-update cadence and compatibility with your build and production environment. |
| Azul Zulu | Another vendor build available through the Java ecosystem. | Architecture coverage, support terms, and the exact major version offered. |
| IBM Semeru Runtimes | Relevant where IBM’s runtime options or platform support matter. | Which runtime variant and Java version your application expects. |
| Red Hat build of OpenJDK | Worth considering in environments standardized on Red Hat support. | Subscription, support, operating-system, and update requirements. |
| SapMachine | An additional OpenJDK option listed by VS Code. | Platform availability and project support before adopting it as a team standard. |
The table describes selection criteria, not a performance ranking. The cited official material provides no independent adoption, speed, or installation-time comparison, so claims that one distribution is universally faster or safer would be unsupported. Licensing and update policies can differ, particularly among Oracle distributions; read the vendor’s current terms rather than relying on an old blog post.
What matters more than the vendor name?
- Project compatibility: the distribution must provide the major version and architecture your build supports.
- Support lifecycle: an LTS line may better match an application that cannot upgrade frequently.
- Operating-system coverage: check installer and package availability for every developer and CI machine.
- Licensing and updates: understand whether updates, redistribution, or commercial support have conditions.
- Tool visibility: the JDK must expose its home directory clearly so VS Code and build tools can use it.
- Installation method: a signed installer, package manager, archive, or VS Code downloader can each be appropriate, provided you can identify the resulting JDK directory.
How do I install a JDK and connect it to VS Code?
Install a JDK first, then install VS Code’s Java tooling and select the JDK. VS Code requires a JDK for Java development; its Extension Pack for Java supports Java 1.8 and later. You can use a locally installed runtime, the Java extensions’ JDK Downloader, or a JDK already selected by your operating system.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRoute 1: install from a vendor, then let VS Code detect it
- Download the JDK major version, operating system build, and CPU architecture required by your project.
- Run the vendor installer or extract the archive. Note the JDK home directory; it is the directory above
bin, not thebindirectory itself. - Install VS Code.
- In VS Code, install Extension Pack for Java, or start with the Java General profile if that is the profile offered by your installation.
- Open a folder containing Java code. VS Code can also read and debug a standalone
.javafile without a project. - Open the Command Palette and run Java: Configure Java Runtime. Confirm that the detected entry points to the JDK home directory.
Route 2: use the Java JDK Downloader
With the Java extensions installed, open View > Command Palette and run Download, install, and Use JDK. Choose a distribution and version, allow the download to finish, and then use Java: Configure Java Runtime to inspect the selected runtime. This route is convenient for a first setup, but you still need to know which version was selected if a project later requires a different one.
Configure several JDKs for different projects
When multiple versions are installed, add them to VS Code’s java.configuration.runtimes setting. The path value must be each JDK’s home directory. Mark one entry as the default for unmanaged folders; Maven and Gradle projects should continue to declare their required JDK through their own build configuration.
{
"java.configuration.runtimes": [
{
"name": "JavaSE-25",
"path": "C:\Program Files\Java\jdk-25",
"default": true
},
{
"name": "JavaSE-21",
"path": "C:\Program Files\Java\jdk-21"
}
]
}
Use paths that actually exist on your computer; the example illustrates the setting’s shape. If VS Code detects a runtime but the project still fails, inspect the project’s Maven or Gradle toolchain and its source/target settings rather than changing the global default blindly.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
What if VS Code says no JDK was found?
- Run
javac -versionoutside VS Code. If it fails, fix the JDK installation or shell environment first. - In Java: Configure Java Runtime, check that the path ends at the JDK home, not at
.../bin. - Close and reopen the terminal after changing environment variables; restart VS Code if it was already running.
- Check that the selected JDK’s major version is compatible with the project and with the Java extensions.
- If several JDKs are installed, inspect every configured runtime and the order of your system
PATH.
How do I set JAVA_HOME and PATH?
JAVA_HOME identifies the JDK directory for tools such as Maven, Gradle, and Android Studio. PATH tells the shell where to find commands such as java and javac. Set both deliberately, then open a new terminal so the process receives the changed environment.
Windows
On Windows, Microsoft instructs users to set JAVA_HOME to the JDK path and add %JAVA_HOME%bin to the system Path.
- Locate the installed JDK home, for example
C:Program FilesJavajdk-25. Do not useC:Program FilesJavajdk-25binasJAVA_HOME. - Open Windows search and type environment variables, then choose Edit the system environment variables.
- In System Properties, select Environment Variables.
- Under the appropriate user or system section, create or edit
JAVA_HOMEand enter the JDK home path. - Edit
Pathand add%JAVA_HOME%binas its own entry. - Accept the dialogs, close existing terminals, open a new PowerShell or Command Prompt window, and verify the result.
In PowerShell, inspect the variable with:
echo $env:JAVA_HOME
java -version
javac -version
If a different JDK still runs, Windows is finding an earlier java.exe or javac.exe earlier in Path. Move the intended entry ahead of conflicting entries or remove obsolete JDK paths, then open another terminal.
macOS
macOS provides the java_home utility to select a JDK. Oracle documents using /usr/libexec/java_home; /usr/bin/java finds the newest installed JDK for command-line tools.
- Install the JDK package for your Mac’s architecture.
- List the JDKs macOS can see with
/usr/libexec/java_home -V. - For the current shell, select a version with a command such as
export JAVA_HOME=$(/usr/libexec/java_home -v 25), using a version that is actually installed. - Run
java -versionandjavac -version. - If you want the selection in future shells, place the export line in the shell startup file used by your account, then open a new terminal.
The exact startup file depends on the shell, and the JDK’s installation directory can differ between distributions. Let java_home report the path instead of hard-coding a guessed location.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Linux
Linux setup depends on the distribution and the package or archive method you choose. Install a JDK package that matches the project’s required version, identify its home directory, and follow that distribution’s mechanism for selecting the default Java and compiler. Then set JAVA_HOME to the JDK home when build tools require it, ensure the corresponding bin directory is available through PATH, and open a new shell before testing.
Do not copy Windows syntax such as %JAVA_HOME%bin into a Unix shell. Windows uses percent-delimited variables and backslashes; macOS and Linux normally use variables such as $JAVA_HOME and colon-separated PATH entries.
How do I check which Java version is active?
Use both the runtime and compiler checks, then confirm the runtime selected by VS Code. A successful java command alone does not prove that a compiler is available or that the editor is using the same JDK.
Check from a terminal
java -version
javac -version
java -version reports the active runtime. javac -version confirms that the compiler from a JDK is reachable. On Windows PowerShell, also run echo $env:JAVA_HOME to see which home directory your current shell advertises.
Check inside VS Code
- Open the Command Palette.
- Run Java: Configure Java Runtime.
- Review detected runtimes, their paths, and the runtime selected for the current workspace.
- If needed, edit
java.configuration.runtimesand mark the intended entry as the default for unmanaged folders.
Compare the path shown by VS Code with the result of your terminal commands. They can differ when VS Code was opened before you changed environment variables or when the workspace has an explicit runtime setting.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Common symptoms and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
java is missing |
No JDK is installed, or its bin directory is not on PATH. |
Install a JDK or correct PATH, then open a new terminal. |
java works but javac is missing |
A runtime-only package is active or the JDK compiler is not on PATH. |
Install/use the JDK and ensure its bin directory is selected. |
| VS Code reports no JDK | The editor cannot see the environment, or its configured path is wrong. | Restart VS Code, run Java: Configure Java Runtime, and point to the JDK home, not bin. |
| The wrong major version appears | Another JDK occurs earlier in PATH, or the workspace selects a different runtime. |
Inspect path order and workspace runtime settings before removing installations. |
| A build rejects the selected version | The project declares a different source, target, or toolchain level. | Follow the project’s Maven, Gradle, CI, or deployment requirement and select that JDK for the project. |
What is the safest setup plan for a new Java learner?
Use the project’s version when one exists; otherwise start with the current LTS identified by the authoritative download page at installation time. A clean setup is easier to maintain when you make one deliberate default and add other JDKs only for projects that need them.
- Read the project’s required Java version and build-tool documentation.
- Choose a reputable distribution available for your operating system and processor.
- Install the JDK, record its home directory, and avoid setting
JAVA_HOMEtobin. - Install VS Code and the Extension Pack for Java or Java General profile.
- Set Windows
JAVA_HOME/Path, macOS shell selection, or the equivalent Linux configuration. - Open a new terminal and run both version commands.
- Use Java: Configure Java Runtime to verify VS Code’s selection.
- For multiple versions, configure explicit runtimes and let Maven or Gradle toolchains control project builds.
This approach separates three decisions that are often confused: which JDK is installed, which commands the shell finds first, and which runtime the editor or build uses. Keeping those decisions visible prevents most “Java is installed but VS Code cannot find it” problems.
Frequently Asked Questions
Can I keep more than one JDK installed on the same computer?
Yes. Multiple JDKs are normal when different projects target different Java releases. Keep each installation in its own directory, select the command-line default through your operating-system configuration, and select a project-specific runtime in VS Code or the build tool.
Recommended Free Tools
Will changing JAVA_HOME change the Java version inside an already open terminal?
No. A terminal inherits environment variables when its process starts. Close that terminal and open a new one after changing JAVA_HOME or PATH; restart VS Code as well if it was already running.
Why does a Maven or Gradle build use a different Java version than VS Code?
The build tool can honor a declared toolchain, IDE setting, wrapper configuration, or CI environment instead of the editor’s default runtime. Inspect the project’s build configuration and toolchain selection before changing your global Java installation.
Do I need to uninstall an older JDK after installing a newer one?
Not necessarily. Removing it can break an older project or a system service that still targets that major version. First identify consumers and update PATH, JAVA_HOME, VS Code runtimes, and build-tool settings; uninstall only when no remaining workload requires it.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

