bat脚本加载多个jar包至classpath启动工程

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhenghuasheng/article/details/52790410

实例工程目录结构:
这里写图片描述

bin:当前工程打包的jar文件
springboot_sample_jar:依赖包文件夹
startup-data.bat:启动脚本

启动脚本内容:

title springboot
@echo off  
set OPTS=-Xms512M -Xmx512M -Xss128k -XX:+AggressiveOpts -XX:+UseParallelGC -XX:NewSize=64M
set LIBPATH=springboot_sample_jar
set ENGINE=bin/springboot-sample.jar
set CP=%ENGINE%

echo ENGINE:%ENGINE%
set MAIN=com.sample.SampleMybatisApplication

set CP=%CP%;%LIBPATH%/*
echo ===============================================================================
echo.  
echo   Engine Startup Environment  
echo   CLASSPATH: %CP%  
echo.  
echo ===============================================================================  
echo.  
java -cp %CP% %MAIN% %OPTS%

猜你喜欢

转载自blog.csdn.net/zhenghuasheng/article/details/52790410
今日推荐