Cheap VPS host selection
Provide server host evaluation information

Forget what to do with the jdk installation path. View the jdk installation path under different systems

If you forget the installation path of JDK, you can try the following methods to determine the installation location of JDK:

On Windows:

  1. Open a Command Prompt or PowerShell.
  2. Run the following command: where java This will list the paths of all executable files named "java" on the system. This includes the installation path of JDK.

On macOS or Linux:

  1. Open the terminal.
  2. Run the following command: which java This will display the path of the java executable used in the system, that is, the installation path of JDK.

These commands will display the path of Java related executable files, which are usually located in the bin directory of the JDK installation. From this path, you can navigate up to the root directory where you can find the JDK.

If the JDK installation path is not found in the above methods, you can also consider other exploration methods:

On Windows:

  1. Open Control Panel ->Programs ->Programs and Features.
  2. Look for Java, JDK, or similar entries in the list of installed programs. There may be multiple JDK version entries. Select the version you want to find and view its installation path.

On macOS:

  1. In the Finder, go to the Applications folder.
  2. In the application folder, find and open a folder named "Java" or "JDK". In this folder, you may find the installed version of JDK and view its path.

On Linux:

  1. Open the terminal.
  2. Run the following command: ls -l /usr/bin/java This will show /usr/bin/java The target path of the symbolic link, that is, the installation path of the JDK.

If the above method still cannot find the installation path of the JDK, you may need to reinstall the JDK and make sure to remember the installation path for future reference.

Do not reprint without permission: Cheap VPS evaluation » Forget what to do with the jdk installation path. View the jdk installation path under different systems