Run the “java –version” command in a Terminal window to verify the Java model your PC is utilizing. It’s also possible to open the “About Java” window from the Begin menu, however it might present a distinct model of Java that is not at present getting used when you have Java variations put in.
Sometimes applications will suggest or require a particular model of Java to operate. The issue will get worse for those who’ve put in a number of variations of Java. How have you learnt which model you’re utilizing? Fortunately, one command is all you want.
Test Your Java Model with the Terminal
There are many methods to find out what model of Java you will have put in, whether or not you’re utilizing Home windows 11 or Windows 10. For instance, you may often enter “About Java” within the Begin Menu search and click on the outcome to get a Java model. However that doesn’t all the time show the model your system will really attempt to use for those who 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 concentrate on which model you’re really 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 by way of the Terminal. It doesn’t matter for those who use Command Immediate or PowerShell. Hit Home windows+X to open the Power User Menu, then faucet “i” to open up Terminal. Alternatively, you may click on the Begin button and enter “Terminal” within the search bar.
Enter java -version
into the Terminal and hit Enter.
Your Java model shall be displayed within the Terminal straight underneath 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 it’s essential to change which model of Java your system makes use of, you’ll must edit your system’s environment variables, particularly the PATH. You are able to do that with the common Home windows graphical consumer interface, or you may use CMD (or PowerShell) to modify environment variables.
When you’re coding, you may vastly simplify your life through the use of an integrated development environment (IDE) — like Eclipse or IntelliJ IDEA — that permits you to swap between Java variations whereas working.
Bear in mind, having a number of variations of Java put in concurrently isn’t a significant downside. It’s really fairly widespread. You simply should be positive which model you’re really utilizing.