Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 04 13:54

    mordechaim on master

    Credit sponser (compare)

  • Apr 29 12:56
    mordechaim closed #131
  • Apr 20 13:50
    mordechaim commented #131
  • Apr 20 13:48
    kunterbunt13 opened #131
  • Apr 20 12:45
    mordechaim commented #83
  • Apr 20 10:46
    nemphys commented #83
  • Apr 05 18:14
    mordechaim commented #130
  • Apr 03 17:24
    seinecle commented #130
  • Apr 02 17:11
    stirante commented #130
  • Apr 02 15:16
    ttzv commented #130
  • Apr 02 13:53
    mordechaim commented #130
  • Apr 02 13:52
    mordechaim commented #130
  • Apr 02 08:55
    seinecle opened #130
  • Mar 19 12:33
    mordechaim commented #128
  • Mar 19 07:14
    seinecle commented #128
  • Mar 18 23:53
    mordechaim commented #128
  • Mar 18 23:53
    mordechaim commented #128
  • Mar 18 23:52
    mordechaim commented #128
  • Mar 18 22:08
    seinecle commented #128
  • Mar 18 18:44
    mordechaim labeled #101
Bernd Eilers
@bei
well both jlink and jpackage have --add-modules as well as --limit-modules so it is probably not much of an issue anyway and the developer can use --limit-modules if bootstrap and business both require less than a full javase to create smaller install packages. Hope that works should just testcase it.
Bernd Eilers
@bei
The point is though the require javase in the module-info.jar is not needed there and it only makes things less flexible and complicated.
Bernd Eilers
@bei
your java -cp update4.jar.... and the DefaultBootstrap from your example will work anyway provided the java is from a jre build with javase module included and in your documentation for how to use it with jlink you explicitly use --add-modules javase. But as a developer for the business application I should know what my application needs and be able to customize a more specific --add-modules commandline or have my build tools do that for me. But if such build tools find the require javase already in the module-info of update4j they would by default include that even if it is not needed fully by the business app later.
Mordechai Meisels
@mordechaim
After dealing with issue #53 I decided that clear cut documentation is better than stealthy behavior and having the developer stuck with weird errors. So I will remove java.se, leave only the bare required modules and have it clearly documented.
Also plan to add a parallel download feature. Tricky, still trying to figure how to make it work.
Bernd Eilers
@bei
Hi Mordechai Meisels!
saw that you made the change to module-info.java to require only the needed java modules. Pretty nice thank you for that.
Bernd Eilers
@bei
I am currently working on a maven plugin to package update4j bootstrap and business and generate the update4j config during the build process. This analyzes the java module dependencies and maven dependencies and generates update4j config files and a java runtime specially linked for the application.
It checks which maven dependencies of the bootstrap and business application are real java modules, automatic java modules or jar files which must be put on the classpath by calling the jdep tool.
Bernd Eilers
@bei
It calls jlink to create a java runtime which contains all java system modules which are used by both the business and the bootstrap application plus the module for the bootstrap application.
Bernd Eilers
@bei
The plan is that the developer must not create a java source file to create the update4j config manually by using the update4j Configuration API but instead just specifies which are the maven artifacts for the bootstrap and the business application and everything else is than done by the maven plugin.
For this maven plugin the change in your module-info.java came just in time.
Bernd Eilers
@bei
I already have a somewhat working local version and willl most likely publish that maven plugin on github somewhere in the next weeks.
Mordechai Meisels
@mordechaim
Wow!! was waiting for someone to do this, I just don't master Maven plugins enough to do this myself. 👏😍
module-info.java changes is not released yet, hope for next few days
Bernd Eilers
@bei
For the parallel download feature please consider to add an option for the Bootstrap Application to turn this feature off. On the one hand this is a good idea to speed up update times this way and it will work well when the application is infrequently started. But on the other hand for company internal use when the update is scheduled for a fixed time and shortly after that all users at the same time are restarting the application i can imaging the webserver delivering the update getting into troubles when parallel download is being used.
Bernd Eilers
@bei
The Maven plugin I am just creating is kind of "tricky" also. The problem is to "jlink" or "jpackage" the bootstrap application you have to know the java system module dependencies of the business application. In order to generate the update4j config and create a zip file for the business application on the other hand you have to know what is already in the bootstrap application classpath and module path so that this is not put into the business application. To get out of this dilema I use 3 Maven POMs.- First I analyze the maven dependencies of the bootstrap application. Than I analyze the java system module dependencies of the business app and create a zip file and an update4j config file for that. The last POM than generates the Java Runtime with the bootstrap module and all java system module dependencies of both the business and the bootstrap application.
These steps are already working. The next thing I want to do is to jave
... to have just 1 POM which generates these 3 other POMs from templates and calls them. To be much flexible I have the idea to add a <update4jScript> Config Parameter for the maven plugin where the developer has the possibility to call just any Method on the Configuration.Builder of update4j during the process.
Bernd Eilers
@bei
Hi Mordechai Meisels!
i have just gone live on github with my maven plugin for update4j

There is als a sample pom.xml in a Section with the heading "Usage for projects that are using update4j" which you can find here:

https://agilhard-oss.github.io/jpacktool-maven-plugin/site/usage.html#Usage_for_projects_that_are_using_update4j

Kind regards,
Bernd
Bernd Eilers
@bei
A Sample project for this can be found at https://github.com/bei/demo-jpacktool-update4j - I deleted some stuff from a forked demo-business because some 3rd-party libs being used there do not behave well e.g. using modules which require to use packages in other modules which those do not export - my plugin does currently not yet have a workaround for such misbehaviour.
If you would like to contribute to the jpacktool-maven-plugin you would be welcome. As the author of update4j you probably have some own usefull ideas about what such a plugin should / could do.
Mordechai Meisels
@mordechaim
Wow! sounds interesting. Personally I never worked with Maven plugin development so I'm not sure how I'll help.
I can link it in the README if I find it useful. Gotta try it myself first.
Mordechai Meisels
@mordechaim

Btw reading this and see

<bootstrapMainModule>org.update4j.demo.bootstrap</bootstrapMainModule>

I don't think you need the module name if you have the class name. Remember, the module system disallows split packages.

Bernd Eilers
@bei
Well this not a required Argument. If it is present the startup Script in the Java Runtime created Calls Java with mainModule/mainClass if not just
with mainClass
Services
See java --help
Bernd Eilers
@bei
It would be probably Top war
It would be probably T
Bernd Eilers
@bei
It would be probably too early too mention my plugin in your README as of now it's just very experimentell and it's not published on Maven Central yet. But thanks for considering it and Thanks for trying it out if you may find the Time to do so.
Zachary Boe
@thezboe
does update4j support downloading over 2 way ssl?
Mordechai Meisels
@mordechaim

@thezboe Yes! In fact you can use any protocol of your choice, even old-fashioned sockets if you wish.

By default update4j will try to download a file using standard http/s and will assume that the file is publicly available. To change this, you should implement your own UpdateHandler and provide your own logic at openDownloadStream().

Once the connection was established, just return an InputStream; do not read the file yourself in that method, leave it up for the framework.

Then install the provider into the framework by following this guide.

myteer
@myteer
@mordechaim If both bootstrap app and business app are javafx application, and i have no right to modify business app, what can i do to avoid exception: “Application launch must not be called more than onceApplication launch must not be called more than once”
Mordechai Meisels
@mordechaim
@myteer You can't start JavaFX twice, but you can pass a new stage into the start() method:
var myapp = new MyApplication();
myapp.init(); // not needed if it wasn't overridden
myapp.start(new Stage());
myapp.stop();// also not needed if not overriden
Mordechai Meisels
@mordechaim
Note: Closing the bootstrap window before the business window is open might cause the runtime to exit. Call Platform.setImplicitExit(false) to prevent this, and remember to reset it to true once visible, or call Platform.exit() when you want to terminate.
myteer
@myteer
@mordechaim got it, thanks for your advice.
ddark008
@ddark008
Hello, can I launch app with javaagent with update4j?
Mordechai Meisels
@mordechaim
Yes, they shouldn't conflict in any way.
ddark008
@ddark008
Okey, next level, run app with javaagent on special version jre7?
Or just update and run exe files?
Mordechai Meisels
@mordechaim
Update4j must run on jdk 9+ but you can do the update and then launch a new instance of any jvm or script/executable without update4j at all. As the bullet points in the documentation says, use it for just the update feature.
Something like Runtime.getRuntime().exec()
Mordechai Meisels
@mordechaim
I just opened issue #88 that should make these kind of stuff easier.
mcesar29
@mcesar29
Hi, how can i use it with spring boot application?