Windows快速部署xxl-job.jar

1.在官网下载文件 https://gitee.com/xuxueli0323/xxl-job

2.在idea打开项目

3.修改maven版本,当前版本(2025/2/22)需要使用maven3.6.3+,maven地址:https://maven.apache.org/download.cgi

maven版本过老的报错信息:

Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.11.2:
jar (default) on project xxl-job: The plugin org.apache.maven.plugins:
maven-javadoc-plugin:3.11.2 requires Maven version 3.6.3 -> [Help 1]

 重新加载maven项目,里面的依赖都需要新下载一下

4.maven一键打包(package),在target中获得jar包。

 

5.使用命令 java -jar my.jar运行jar包

如果本地默认jdk是17-,那么程序是无法运行的

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: 
org/springframework/boot/loader/launch/JarLauncher has been compiled by a more recent
version of the Java Runtime (class file version 61.0),
this version of the Java Runtime only recognizes class file versions up to 52.0

修改命令(临时使用其他jdk版本)

"C:\Users\17900\.jdks\corretto-17.0.9\bin\java.exe" -jar xxl-job-admin.jar

封装成脚本

@echo off
"C:\Users\17900\.jdks\corretto-17.0.9\bin\java.exe" -jar xxl-job-admin.jar
pause

 

posted @   天启A  阅读(14)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
历史上的今天:
2024-02-22 sparkSQL
2023-02-22 2月22日软件工程日报
2023-02-22 AS上的基础中级控件-图形定制
点击右上角即可分享
微信分享提示