- Here is a similar problem, you can refer to: https://ask.csdn.net/questions/7536912
0 Answer
jdk not downloaded or jdk point environment variables not configured
This problem may be caused by an unconfigured or incorrectly configured Java environment variable. You can try to resolve it by following these steps:
1. First, check that your Java is properly installed and your environment variables are configured. To check whether Java is installed successfully, run the following command on the terminal:
java -version
If you have successfully installed Java, you should be able to see the Java version information.
2. If Java is installed correctly, then you can check that the VS Code Java plug-in is installed correctly. You can check by following these steps:
Open VS Code and select "Extensions" in the left sidebar.
Type "Java Extension Pack" or "Language Support for Java by Red Hat" in the search box to check that the plug-in has been installed correctly.
3. If the plug-in is installed correctly, you should be able to see the version information of the plug-in, otherwise you can click the "Install" button to install it.
If the plug-ins for Java and VS Code are installed correctly, then you can try running the Java program manually in the terminal to determine if there is a problem with the program. You can run Java programs manually using the following command:
java -cp /path/to/class/file ClassName
where /path/to/class/file is the path to your Java program's class file, and ClassName is the class name of your Java program. If the program works, you should see the output of the program in the terminal.
4. If the above steps do not solve the problem, you can try to reinstall Java and VS Code, or try to install and run Java programs on other machines to determine if the problem is related to a particular machine or environment.
这家伙很懒,什么都没留下...