Sometimes after we import the program, the system will give an error message: Java: package xxxx does not exist. Now I have a trick, which is to use IDEA to automatically import the Java package. This is also a major advantage of IDEA.
When an error like the one shown in the title occurs, don’t worry. This is because there is an error in configuring the Java program package. At the same time, you may not have set up IDEA to automatically load the Jar package, which is why this report is reported. kind of wrong. The solution is as follows:
File—>Setting—>Build, Execution, Deployment—>Maven—>Importing
Then configure as shown below:
After configuring as shown above, click apply, then click OK. At this time, refresh IDEA and you can see that the Jar package is insufficient and a Java: package xxxx does not exist. The error will disappear automatically, and many jar packages will appear in the External Libraries on the left column, as shown below:
OK, the problem is solved, it is that simple, this is IDEA The charm is that it is convenient to download the jar package and facilitate everyone's programming.
Recommended tutorial: Getting started with java development
The above is the detailed content of The editor prompts that the java package does not exist. For more information, please follow other related articles on the PHP Chinese website!