1. Create a .java file in any directory
2. Use the cmd command in the current directory: javac filename to compile
If an error is reported, use this command javac -encoding UTF-8 filename
3. The .class file has been successfully generated at this time
4. You can manually add the MANIFEST.MF file
Manifest-Version: 1.0 Main-Class: fileName
5. Directly use jar cvfm Robotsdaka.jar MANIFEST.MF *.class in one step to solve the main list error problem
Scheduled task execution:
You can use the task scheduler that comes with Windows to achieve this requirement. Specific steps are as follows:
- Create a new task schedule, which can be found in Control Panel -> Administrative Tools -> Task Scheduler.
- Create a new task in the task scheduler, set the trigger to 8:00, 12:00 and 19:00 every working day, and set the action to run the bat file to execute the jar file.
- Save and enable the task.