@echo off ::进入到此脚本目录 cd /d %~dp0 set root=%~dp0 ::echo打印 echo %root% ::赋值语句等号两边不能有空格 set protopath=%root%proto\*.proto set jarpath=./jprotobuf-2.4.16-SNAPSHOT-jar-with-dependencies.jar echo %protopath% echo ${jarpath} for %%i in (%protopath%) do ( ::打印路径 echo %%i java -jar %jarpath% --java_out=../src/main/java/ %%i ) pause
调用jprotobuf-2.4.16-SNAPSHOT-jar-with-dependencies.jar 包生成proto文件
标签:set,java,proto,%%,jar,echo,例子,包得 From: https://www.cnblogs.com/ruber/p/16735276.html