当前位置:网站首页>把xshell連接服務器關掉,運行的jar包就自動停止的解决方案
把xshell連接服務器關掉,運行的jar包就自動停止的解决方案
2022-07-02 17:48:00 【梁萌】
使用Xshell連接服務器時,啟動項目之後,可以正常運行,一旦將Xshell關閉,項目就會自動關閉。
說明Xshell終端對項目產生了一定的影響,需要換一種項目啟動方式。
解决方式
原來的啟動方式:
1.窗口被鎖定,可按CTRL + C打斷程序運行,關閉窗口程序停止運行
java -jar xxx.jar
2.窗口不被鎖定,關閉窗口時,程序停止運行
java -jar xxx.jar &
修改後的啟動方式:
1.nohup 意思是不掛斷運行,當賬戶退出或終端關閉時,程序仍然運行,日志內容默認存入nohup.out 文件內
nohup java -jar xxx.jar
2.nohup啟動的日志輸出文件nohup.out是自動生成的,但是我們更希望自己指定日志輸出文件,比如輸出日志到logs.log文件中,用以下命令:
nohup java -jar xxx.jar > logs.log &
边栏推荐
- [how is the network connected] Chapter 6 requests arrive at the server and respond to the client (end)
- Microservice architecture practice: Construction of highly available distributed file system fastdfs architecture
- SAP commerce Cloud Architecture Overview
- SAP Commerce Cloud Storefront 框架选型:Accelerator 还是 Spartacus?
- [nonlinear control theory]7_ High gain and High Frequency
- [today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now
- Five reasons to choose SAP Spartacus as the implementation framework of SAP commerce cloud storefront
- Solution to the problem that the easycvr kernel of intelligent video analysis platform cannot be started as a service
- SSB threshold_ SSB modulation "suggestions collection"
- [nonlinear control theory]8_ Comparison of three robust controllers
猜你喜欢
【目标跟踪】|数据集汇总
ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
Daily question - "number of daffodils"
嵌入式 ~ 介绍
easyAI笔记——机器学习
一日2篇Nature!中科大校友段镶锋团队纳米材料新成果,曾是贝尔比奖章第三位华人得主...
Solution to the problem that the easycvr kernel of intelligent video analysis platform cannot be started as a service
Navigateur Chrome pour un accès rapide au stackoverflow
After meeting a full stack developer from Tencent, I saw what it means to be proficient in MySQL tuning
[target tracking] | data set summary
随机推荐
蓝牙技术|物联网的可穿戴设备新工作模式,蓝牙BLE助力新工作模式
chrome瀏覽器快速訪問stackoverflow
Solving simple differential equations
Si446 usage record (I): basic data acquisition
Atcoder beginer contest 237 VP supplement
Map集合详细讲解
List summation [dummy+ tail interpolation + function processing list reference common pit]
MB10M-ASEMI整流桥MB10M
阿里天池SQL学习笔记——DAY3
Microservice architecture practice: using Jenkins to realize automatic construction
USB interface powered Bluetooth color light strip controller
AtCoder Beginner Contest 237 VP补题
PMS132B单片机TWS数码管蓝牙充电仓方案开发
ROS knowledge points -- the difference between ros:: nodehandle N and NH ("~")
我的创作纪念日
【网络是怎样连接的】第五章 探索服务器
Daily question - inverted string
辉芒微IO单片机FT60F011A-RB
CEPH principle
VirtualLab基础实验教程-7.偏振(1)