This article illustrates how you can install Java on a Windows 11 computer, and how to remove it if and when required. Moreover, it also illustrates how to create the environmental variable for Java in Windows 11.
How to check the Java version on Windows 11
Before we tell you how to install Java, we must first check whether Java is already installed on your computer or not. If so, what is its version? Follow the steps below to check the installation or version of Java: If the command returns “java is not recognized as an internal or external command, operable program or batch file,” it means that Java is not installed on your system.Java not installed However, if it is installed, you will see its version written in the Command Prompt, as in the image below:
Install Java on Windows 11
Installing Java on your computer is not that difficult. We have discussed how you can install it on your Windows 11 device. However, the process is pretty much the same across all Windows versions. Java can also be installed on Linux and MacOS platforms, but the packages/files to install it will be different for each platform. Follow the steps below to install the latest version of Java on Windows 11: Java should now be successfully installed on your Windows 11 device. You can confirm this by running the java -version command in Command Prompt again, as discussed in the previous section of this post.
Create Environmental Variable for Java on Windows 11
Environmental paths in Windows allow a user for any file to be recognized anywhere within the system. This means you can then execute a .exe file (or any other file) from anywhere within the directory, rather than having to navigate to a directory and only then be able to use it. Before we begin, you must first know the complete path to where Java’s latest version has been installed as it will be needed later when configuring the environmental variable. The installation path by default is C:\Program Files\Java\JavaVersion (where JavaVersion is a folder named with the Java version). Since we have installed JDK 17.0.1, the complete path for Java on our device is C:\Program Files\Java\jdk-17.0.1:Java installation path Now that you know the complete path, follow the guide below to create a Java environmental path: You have now successfully created the Java environmental variable on your Windows 11 device. You can further manipulate this variable by changing the Variable Value to run an older version of Java (if already installed). Furthermore, you can also delete the variable by selecting it from under the System Variables list in the Environmental Variables window and then clicking Delete.Delete Java Environmental Variable
How to Uninstall Java on Windows 11
You can also remove Java from your Windows 11 device just as easily, if and when you no longer need it. Here’s how: Java will now remove itself from your computer with no restart required. Also see:
How to Install And Check Python Version In Windows, Mac, & LinuxHow to Uninstall Microsoft Edge in Windows 11Download And Install Windows 7 Games For Windows 11 For FreeHow to download and install Microsoft Office language packs4 Ways to Convert VirtualBox VDI to VMware VMDK