IDEA
Confirmation is required before performing the following operations:
There is no syntax error in the class file in the package, the project SDK and SDK version numbers are consistent, and the settings of main method and main path
The above confirmed problems will cause the compilation to fail. The solutions are as follows:
The opening method is: File----->Project Structure----->Project
To compile the project, first click on Artifacts in the File----->Project Structure----->Project directory
Here you need to add an item. You can choose to search from the current edit page
. After operating as shown in the figure, he will automatically add a main class. After clicking OK, you need to confirm the main class.
After confirming that the information of the main class is obtained, click Apply
Select Build from the upper toolbar
Find Artifacts under build
In the first execution, we choose Build, and after executing it once, if we want to perform this operation again, we must choose ReBuild
The completed project will be saved in the OUT folder
Right-click under the current .jar file and select to run the file. If the debugging is successful, it means that the .jar file was created successfully
The .jar to exe file may use the exej4 program innersetup to package the jar file and program file to ensure that the application can also be downloaded and used on a computer without JDK