23 lines
860 B
Batchfile
23 lines
860 B
Batchfile
|
@echo off && chcp 65001
|
||
|
::call mvn clean package
|
||
|
set jarPrefix=jeecg-module-system\jeecg-system-start\target\
|
||
|
for /f "delims=" %%i in ('dir %jarPrefix%*.jar /b ') do @set jarPath=%%i
|
||
|
|
||
|
echo 如果编译错误请设置JDK为17版本
|
||
|
echo %jarPrefix%%jarPath%
|
||
|
if not exist javaPath.txt (
|
||
|
echo 请在项目根目录创建【javaPath.txt】文件并填写jdk路径,文件内容大致为【D:\ProgramGreeFile\JAVA\1.8.0_192\jdk1.8.0_192】
|
||
|
pause
|
||
|
exit
|
||
|
)
|
||
|
set /P javaPath=<javaPath.txt
|
||
|
if not defined javaPath (
|
||
|
echo 请在项目根目录创建【javaPath.txt】文件并填写jdk路径,文件内容大致为【D:\ProgramGreeFile\JAVA\1.8.0_192\jdk1.8.0_192】
|
||
|
pause
|
||
|
exit
|
||
|
)
|
||
|
set JAVA_HOME=%javaPath%
|
||
|
set path2=%javaPath%\bin;%path%
|
||
|
echo 开始启动
|
||
|
call set path=%path2% && java -jar -Dfile.encoding=utf-8 -Dspring.profiles.active=local %jarPrefix%%jarPath%
|
||
|
pause
|