Use cmd to create a folder on the desktop, and use cmd to compile and run a java program segment in the folder **
1. Use the shortcut key win + r to open
2. Use the cd desktop command to enter the root directory (desktop)
here. You can use the dir command to view all the directories
under the desktop 3. Use md mybatis to create a folder named mybatis on the desktop (cd mybatis can be used to delete the mybatis folder)
4. Use the cd mybatis command to enter the mybatis root directory, any Use echo (java code) >> Mybatis.java (class name)
Then open the folder you created on the desktop, if
you have created a java program in the current location.
5. Run: Use the command javac Mybatis.java
and then open the mybatis file you created. You will find that there is an additional .class file.
Finally, use the command java Mybatis to run the results. Note that the class name Mybatis is not suffixed with it.