by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 22 19:10
    mordechaim commented #110
  • Sep 22 19:08
    Frozenlock opened #110
  • Sep 22 18:46

    mordechaim on master

    Version bump (compare)

  • Sep 22 18:46

    mordechaim on 1.5.4

    Version bump (compare)

  • Sep 22 18:41
    mordechaim commented #109
  • Sep 22 18:38
    jgutholm commented #109
  • Sep 22 16:50
    mordechaim commented #109
  • Sep 22 16:49
    mordechaim closed #109
  • Sep 22 16:49

    mordechaim on master

    Fix #109, properly resolve UNIX… (compare)

  • Sep 22 16:31
    jgutholm commented #109
  • Sep 22 14:59
    jgutholm commented #109
  • Sep 22 14:57
    mordechaim commented #109
  • Sep 22 14:56
    mordechaim commented #109
  • Sep 22 14:55
    mordechaim commented #109
  • Sep 22 09:26
    jgutholm commented #109
  • Sep 22 01:29
    mordechaim commented #109
  • Sep 22 00:49
    mordechaim commented #109
  • Sep 21 23:21
    jgutholm opened #109
  • Sep 21 00:51

    mordechaim on master

    Extract pattern to constant Im… Merge pull request #108 from mi… (compare)

  • Sep 21 00:51
    mordechaim closed #108
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?
hfbanilatq
@hfbanilatq
Hi how can I use it with spring boot too?
mcesar29
@mcesar29
@hfbanilatq can you use it with spring boot application?
Mordechai Meisels
@mordechaim
Yes, it can be used with Spring Boot. Here are a few points to keep in mind:
Spring applications usually don't restart often so you have to be careful to unload old versions on a running instance, follow up if you need assistance on this.
Mordechai Meisels
@mordechaim
Spring loads classes with reflection, and the classloader doesn't always find the new classes dynamically. Refer to the Classloader Model how to mitigate this problem.
eduarddevninja
@eduarddevninja
Hello, can I use update4j in a SWING application?
Mordechai Meisels
@mordechaim
update4j is platform agnostic. You can use it wherever you wish. Just remember to run the update code off the ETD and push visual updates (e.g. from UpdateHandler) through SwingUtilities.invokeLater()
eduarddevninja
@eduarddevninja
Amazing. Thank you
Osiris Team
@Osiris-Team
So Im new to update4j and Im trying to get it, so pls tell me if I got it correctly. I need to have 2 java apps in total. The first one creates the config.xml file and uploads it to the online http server. It contains the information of my 2nd apps latest version. The 2nd is the app that wants to get updated. It gets the latest config.xml from server and compares it with its local(older) config.xml. Then downloads the update. Is that correct?
Mordechai Meisels
@mordechaim
No. You would usually want the build server itself to create the config as part of the build process, since it deals with build artifacts.
The bootstrap/business architecture only comes to play at the client side. The bootstrap reads the config from the server and decides to do whatever you've designed it to do (remember 'create a framework yourself'?).
For ad hoc usage, start with the default bootstrap that lets you focus on the business app only. Run update4j as a jar file to get started.