How to batch compile all .java files under the whole folder (including subfolders) using javac

196042691-3faec680-6978-424e-b5f0-d7d32a

A while ago, I helped a colleague deal with a Java project that I didn’t know how to automate compilation. Because the project had no build tools (Build Tools) assistance, it completely relied on the built-in build tools of Eclipse, so the engineer didn’t know how to automatically build CI. . In fact, there are many solutions in the Shell environment that can be found on the Internet, but there are few solutions in the Windows environment. For this problem, I wrote an automated script to solve this problem. This script can be applied to almost any simple type. Java project.

continue reading

This article is reprinted from https://blog.miniasp.com/post/2022/10/16/How-to-compile-all-java-code-in-a-folder-recursively
This site is for inclusion only, and the copyright belongs to the original author.