Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 06 17:55
    mordechaim closed #142
  • Jun 06 17:54
    Dustinhoefer commented #143
  • Jun 06 17:51
    mordechaim commented #143
  • Jun 06 17:50

    mordechaim on master

    Fixed a possible NPE Formatting Merge pull request #143 from Du… (compare)

  • Jun 06 17:50
    mordechaim closed #143
  • Jun 06 17:46
    Dustinhoefer commented #143
  • Jun 06 17:46
    Dustinhoefer commented #143
  • Jun 06 17:45
    Dustinhoefer synchronize #143
  • Jun 06 17:45
    Dustinhoefer commented #143
  • Jun 06 17:42
    mordechaim commented #143
  • Jun 06 17:41
    mordechaim commented #143
  • Jun 06 17:34
    Dustinhoefer opened #143
  • Jun 06 17:32
    mordechaim commented #142
  • Jun 06 17:23
    Dustinhoefer commented #142
  • Jun 06 17:22
    mordechaim labeled #142
  • Jun 06 17:07
    Dustinhoefer opened #142
  • Jun 01 15:23
    mordechaim closed #135
  • Jun 01 15:23
    mordechaim commented #135
  • Jun 01 15:23
    mordechaim closed #134
  • May 28 01:08
    mordechaim commented #134
ChrisLMerrill
@ChrisLMerrill
Nice - I hadn't tried gitter before.
FWIW, the update4j-gradle-plugin is pretty minimal - just enough to satisfy my own needs. And to see if there is any interest as update4j grows in users.
Mordechai Meisels
@mordechaim
Yeah, FXLauncher also has plugins but update4j has much more settings for every individual file and it would not be possible to customize them all without code. Of-course you can make one setting and let all files within a certain directory have the same.
Btw, don't see uri for individual files.
an example of how to use update4j and jpackager together. My Christmas present to Mordechai Meisesels.
Update4j is just a great project
Bernd Eilers
@bei
Sorry for the typo in the Name too many Fingers in Keyboard Terror.
Mordechai Meisels
@mordechaim
Wow! 🎁🎅
Will check it out when I have a chance.
BTW there are breaking changes in the current codebase vs the released version, just be aware. There's a whole new dependency injection framework scheduled for release in the next few days.
Mordechai Meisels
@mordechaim
Saw you made a fork of update4j/demo-business, I mistakenly published a system scoped dependency in the pom (reason being that I made small changes to the artifact that are not relevant to the repo or forks for the moment).
Bernd Eilers
@bei
I will just watch your official repo for updates and incorporate that somewhere after christmas.
Had to add a module info and eliminate the use of DatePicker which seemed to be incompatible with java12
Bernd Eilers
@bei
While we are at the topic of modularisation I have a little provokative Question: if update4j was build with Java9 module system in mind should it not use it more. I think I have seen that the lib requires just the whole javase in its module info. I think it should require just what it reallly itself needs which might be just java.base and nothing more and than leave it up to individual Bootstrap code to require more when needed. Some may only want to add a few minor modules and some may want the full JavaSE.
But maybe than DefaultBootstrap.java might want to get moved to another lib or something like that.
Just wanted to open this topic for discussion.
Bernd Eilers
@bei
With the combination of update4j and my jlink jpackager maven plugin plus some stuff the developer must do like creating his own bootstrap there is a migration Path for folks like me who used to use JavaWebstart in the company intranet for company internal applications.
Bernd Eilers
@bei
I think Oracle underestimated the real size of the minority of projects using java on the desktop and especially together with javawebstart to distribute updates quickly. Update4j is just right there to fill the gap they left when dropping java webstart with recent jdk versions. What we might just need is some kind of SampleGuiBootstrap which behaves just similar to java webstart in that it automatically updates when updates are available - shows some splash screen etc. and accepts shows errors in the gui to the user and maybe accept an url for the config file as commandline parameter.
java developers may than package that bootstrap module with javapackager defining the individual java modules and install that instead of a javaruntime with javawebstart on users computers. My jlink-jpackager-maven-plugin adds to that picture some tooling to package the update4j bootstrap code together with the needed java modules as an native installer package.
Mordechai Meisels
@mordechaim
I think it should require just what it reallly itself needs which might be just java.base and nothing more
You are correct, but problem is that a fundamental restriction to the module system is that the business app cannot read system modules that were not resolved in the bootstrap.
Of course I could've require everybody to require what they need in the bootstrap, but that would not work well with the DefaultBootstrap as you said
Mordechai Meisels
@mordechaim
And for jlinked image it will not be possible to add more system modules to the image even if you did require it in the bootstrap of a later update but wasn't required at the time of jlinking.
Mordechai Meisels
@mordechaim
It has been documented here.
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.