GithubHelp home page GithubHelp logo

flover28 / jfx-launcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uncle-novel/jfx-launcher

0.0 0.0 0.0 172 KB

OpenJFX应用的启动器,支持热更新。使用模块化API动态加载模块启动,支持动态修改模块化打破规则。

License: Apache License 2.0

Java 71.30% CSS 8.94% SCSS 19.76%

jfx-launcher's Introduction

JFX-Launcher

gradle build 版本 GitHub license GitHub issues JDK Version

一个openJfx的自动更新器,采用模块化API加载模块。

引入依赖

maven

<dependency>
  <groupId>com.unclezs</groupId>
  <artifactId>jfx-launcher</artifactId>
  <version>1.1.10</version>
</dependency>

gradle

implementation "com.unclezs:jfx-launcher:1.1.10"

原理

在Launcher启动的时候,会对比本地配置与服务端配置是否一致,如果服务端配置与本地不一致,则进行拉取同步。 对比条件:

  1. 版本号是否一致
  2. 各个文件大小是否发生改变

同步完成之后,通过无需调用java指令再去启动,直接通过ModuleApi加载依赖模块,支持打破模块规则的参数, 如:add-exports、add-opens、add-reads可以在配置文件中进行设置

支持加载本地Native库,通过指定资源类型为 NATIVE、NATIVE_SYS 区分系统库与自定义库

简介

指定启动参数

可以通过程序的启动参数来运行启动器:

  • --configPath=配置文件路径(conf/app.json) *
  • --appName=应用名称 *
  • --url=资源下载地址 *
  • --launchClass=启动类 *
  • --launchModule=启动类所属模块 *

配置介绍

  • url: 资源下载地址
  • configPath: 相对于url的配置路径
  • configUrl: 直接指定配置全路径 , 指定了将忽略configPath
  • appName: 应用名称
  • version: 版本号
  • changeLog: 更新日志
  • launchModule: 启动类所属模块
  • launchClass: 启动类
  • moduleOptions: 模块的一些打破规则的参数 : add-exports、add-opens、add-reads
  • resources: 资源列表,升级时候可以自动更新的,可以指定JAR、NATIVE、NATIVE_SYS、FILE类型的,根据不同类型采取不同的加载策略

注意

如果添加了打破模块的规则,并且源模块不属于当前加载的layer,需要添加VM参数允许反射

--add-modules ALL-SYSTEM --add-opens=java.base/java.lang=com.unclezs.jfx.launcher

jfx-launcher's People

Contributors

unclezs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.