jar部署启动bat
程序员文章站
2022-07-10 09:17:23
startup.bat@echo offif not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1set "JAVA=%JAVA_HOME%\bin\java.exe"setlocal enabledelayedexpansion....
startup.bat
@echo off
if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1
set "JAVA=%JAVA_HOME%\bin\java.exe"
setlocal enabledelayedexpansion
set BASE_DIR=%~dp0
set MODE="standalone"
set FUNCTION_MODE="all"
set MODE_INDEX=-1
set FUNCTION_MODE_INDEX=-1
set SERVICE_NAME=API_Service
set "JAVA_OPT=%JAVA_OPT% -server -Xms512m -Xmx512m -Xmn256m"
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
set "JAVA_OPT=%JAVA_OPT% -Dfile.encoding=UTF-8"
set "JAVA_OPT=%JAVA_OPT% -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider"
set "JAVA_OPT=%JAVA_OPT% -Duser.home=UserHome"
set "JAVA_OPT=%JAVA_OPT% -Dspring.config.location=..\config\application.yml"
::set "JAVA_OPT=%JAVA_OPT% -Dlogback.configurationFile=..\config\logback.xml"
echo Starting %SERVICE_NAME%...
echo Please check log file in ./log/%SERVICE_NAME%.log for more information
title %SERVICE_NAME%
call "%JAVA%" %JAVA_OPT% -jar %BASE_DIR%\lib\web-1.0.0-exec.jar -> ..\log\%SERVICE_NAME%.log %SERVICE_NAME%%*
目录结构
root
-- bin
-- lib
-- startup.bat
-- config
-- log
本文地址:https://blog.csdn.net/SakeOfWhat/article/details/110289661
上一篇: 我的网站文章被收录又被删除是怎么一回事?
下一篇: 线程有哪些基本状态?
推荐阅读
-
Linux中jar包启动和jar包后台运行
-
tomcat启动war包原理(tomcat部署war包步骤)
-
jar运行命令(讲解java部署jar还是war优劣)
-
tomcat启动war包原理(tomcat部署war包步骤)
-
Linux下shell通用脚本启动jar(微服务)
-
Linux利用Shell脚本部署jar包项目的完整步骤
-
Centos7服务器下启动jar包项目的最佳方法
-
Spring框架学习笔记(6)——阿里云服务器部署Spring Boot项目(jar包)
-
一个简单的Linux启动jar包的shell脚本
-
在eclipse中使用Maven分模块搭建SSM框架,创建jar、war、pom工程模块教学,项目的热部署,需要的可以留下邮箱,给大家发整理过的Maven笔记