Run the “java –version” command in a Terminal window to examine the Java model your PC is utilizing. You too can open the “About Java” window from the Begin menu, however it might present a special model of Java that is not presently getting used when you have Java variations put in.
Often applications will suggest or require a selected model of Java to operate. The issue will get worse in the event you’ve put in a number of variations of Java. How are you aware which model you’re utilizing? Fortunately, one command is all you want.
Examine Your Java Model with the Terminal
There are many methods to find out what model of Java you have got put in, whether or not you’re utilizing Home windows 11 or Windows 10. For instance, you’ll be able to often enter “About Java” within the Begin Menu search and click on the outcome to get a Java model. However that doesn’t at all times show the model your system will truly attempt to use in the event you run a JAR file.
The discrepancy happens as a result of a number of variations of Java are put in concurrently. That isn’t often an issue — you simply want to pay attention to which model you’re truly utilizing.
RELATED: 7 Ways to Open Windows Terminal on Windows 11
One of the simplest ways to find out which model of Java your PC is utilizing is through the Terminal. It doesn’t matter in the event you use Command Immediate or PowerShell. Hit Home windows+X to open the Power User Menu, then faucet “i” to open up Terminal. Alternatively, you’ll be able to click on the Begin button and enter “Terminal” within the search bar.
Enter java -version
into the Terminal and hit Enter.
Your Java model can be displayed within the Terminal instantly below your command. Within the screenshot above, our instance PC has Java model 17.0.4.1 put in.
RELATED: The New Windows Terminal Is Ready; Here’s Why It’s Amazing
If you have to change which model of Java your system makes use of, you’ll have to edit your system’s environment variables, particularly the PATH. You are able to do that with the common Home windows graphical person interface, or you’ll be able to use CMD (or PowerShell) to modify environment variables.
For those who’re coding, you’ll be able to vastly simplify your life through the use of an integrated development environment (IDE) — like Eclipse or IntelliJ IDEA — that lets you change between Java variations whereas working.
Keep in mind, having a number of variations of Java put in concurrently isn’t a serious downside. It’s truly fairly frequent. You simply have to be positive which model you’re truly utilizing.