Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 23 2021 16:36
    stale[bot] closed #101
  • Dec 23 2021 16:36
    stale[bot] closed #130
  • Dec 19 2021 06:21
    mordechaim closed #160
  • Dec 19 2021 06:21
    mordechaim commented #160
  • Dec 16 2021 15:48
    stale[bot] labeled #130
  • Dec 16 2021 15:48
    stale[bot] labeled #101
  • Dec 16 2021 15:48
    stale[bot] commented #130
  • Dec 16 2021 15:48
    stale[bot] commented #101
  • Dec 16 2021 15:31

    mordechaim on master

    Add stalebot (compare)

  • Dec 15 2021 15:47
    mordechaim closed #161
  • Dec 15 2021 15:47
    mordechaim commented #161
  • Dec 15 2021 15:45
    torchwood1715 opened #161
  • Dec 13 2021 15:48
    mordechaim closed #159
  • Dec 13 2021 15:48
    mordechaim closed #158
  • Dec 13 2021 15:48

    mordechaim on master

    Add --archive option to allow s… (compare)

  • Dec 13 2021 13:54
    hinca commented #159
  • Dec 13 2021 04:18
    stirante commented #160
  • Dec 12 2021 23:52
    mordechaim commented #160
  • Dec 12 2021 23:52
    mordechaim commented #160
  • Dec 12 2021 09:08
    stirante commented #160
Mordechai Meisels
@mordechaim
Travis or GitHub actions work seamlessly on GitHub hosted repos
The beauty of continuous integration is you can define which git branch should build a development build and which should be production. Update4j works very nicely, since you can have any amount of configs at once. Just pull the one you need and that app will run. You might have a dev config or prod config
Osiris-Team
@Osiris-Team
Guys I am getting this issue. Any idea why?
: java.lang.IllegalStateException: Checksum of file 'update-AutoPlugLauncher.xml' does not match checksum in configuration. Expected: 5297b893, found: 266eb851
at org.update4j.ConfigImpl.validateFile(ConfigImpl.java:294)
at org.update4j.ConfigImpl.doUpdate(ConfigImpl.java:179)
at org.update4j.Configuration.update(Configuration.java:1016)
at org.update4j.Configuration.update(Configuration.java:944)
at org.update4j.Configuration.update(Configuration.java:855)
at com.osiris.autoplug.launcher.Main.lambda$main$1(Main.java:68)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Failed to download update!
Mordechai Meisels
@mordechaim
The message is in the exception. The checksum doesn't match.
FWIW you shouldn't list the config itself in the config (obviously you already have that file), otherwise you'll get the size and checksum values of the previous config. You are running in a recursive loop.
Osiris-Team
@Osiris-Team
ok thx
Osiris-Team
@Osiris-Team
Can someone help me? update4j/update4j#100
Mordechai Meisels
@mordechaim
Do you still have any issues? ignoreBootConflict on the file should fix your exception
kvp24
@kvp24
Hello, first of all thank you for an amazing tool!
Currently I have to add updating facility for a legacy java desktop app written with "eclipse SWT" framework. Unfortunately eclipse SWT has different artifacts(jars) for different OS bitness.
Is there any way to define additional information about artifact OS bitness besides OS name ?
Mordechai Meisels
@mordechaim
@kvp24 Unfortunately no, but you can achieve this behavior by using 2 configs where you conditionally decide in the bootstrap which one to use.
kvp24
@kvp24

I did a hack. I wrote OS bitness to commentary field and overrode shouldCheckForUpdate method in UpdateHandler, it's looks working now.

Now I want sign my config. Everything works good with RSA key but if I use ECDSA key I get java.security.NoSuchAlgorithmException: SHA256withEC Signature not available at

Signature sign = Signature.getInstance("SHA256with" + key.getAlgorithm())

this line from ConfigMapper.java:239.
I belive it happens because of naming of algorithms, in java for ECDSA right alg name is "EC" KeyFactory.getInstance("EC") and therefore my key.getAlgorithm() is "EC" and Signature.getInstance("SHA256with" + key.getAlgorithm()) generates "SHA256withEC" instead of "SHA256withECDSA".
Is it bug or feature ?

Mordechai Meisels
@mordechaim
This was fixed in #89. Which version are you using?
kvp24
@kvp24
update4j 1.5.4 with OpenJDK Runtime Environment AdoptOpenJDK (build 15+36)
Mordechai Meisels
@mordechaim
Indeed this is a bug and #89 missed that. Will fix it on next release.
David Metzler
@metzlerd_gitlab
@Thank you for a great tool! @kvp24 I am also working with an old SWT based app. I was wondering if you had to deal with Mac distributions. SWT must run on thread 0 in order to work on a Mac. I'm looking for a way to make sure the Classpath features of update4j would be used but that then we launch the app on thread 0. Have you overcome this limitation?
Mordechai Meisels
@mordechaim

@metzlerd_gitlab I know very little about this but I can tell you that update4j does launch everything in a child thread.

Perhaps you can use update4j as an updater tool and not use the dynamic launch mechanism (i.e. you'll need a new JVM for the launch).

David Metzler
@metzlerd_gitlab
@mordechaim I have gotten this working by launching a whole new JVM after the update has completed for the launch (using ProcessBuilder/Process) but that creates two windowed processes, which means if the user pins the app to their system tray on a mac, then they bypass the updater altogether. I was trying to see if I could somehow start a process on thread 0 with a limited classpath, and then have the Configuration object add jars to the classpath (after having been updated) end then pass off execution to the other main method. That may not be possible.
Mordechai Meisels
@mordechaim
Well, you can do it, but update4j uses a separate thread by design. If you copy the launch code and remove the thread spawning you might get it to work on your own.
This line spawns the thread. The actual launch can skip this step, it's just here to give the business application a separate context.
David Metzler
@metzlerd_gitlab
Thanks, I'll give this a shot.
David Metzler
@metzlerd_gitlab
@mordechaim I tried this but ran into troubles as the constructor for LaunchContext is not public, so I couldn't new up a LaunchContext outside of the package. Is that something you would be willing to change?
Mordechai Meisels
@mordechaim
I don't think I'm going to change this. You could sort-of reimplement the whole launch process with your own logic using my code as helpful pointers. Or you can fork the project.
Mamadou Pathé LY
@foula_ly_twitter
Hello all i need help in how to use update4j in ant project
David Metzler
@metzlerd_gitlab
@mordechaim Thank you for considering. I have worked around this problem by using a two executable strategy that you documented in the Wiki and just using update4j for managing the upgrade process and not for launching. Wanted you to know that I still appreciated the work.
@foula_ly_twitter - could you be more specific? You could simply download the jar and include it as a dependancy. Not sure what is difficult about using upate4j in ant?
Mordechai Meisels
@mordechaim
@metzlerd_gitlab thanks
Julián Murphy
@fkmurphy
Hi, i have a modular application with openjdk 11 and i'm newby in the java world. Is it possible to update modular applications with update4j? I read link https://github.com/update4j/update4j/wiki/Documentation#integration-with-jlink but, i dont understand this. Do i have to replace bat/sh file generate jlink for the example in documentation?
thanks!
Mordechai Meisels
@mordechaim
@fkmurphy yes it is possible, but not when its part of the jlink image.
Julián Murphy
@fkmurphy
my application runs from the jlink generated script, therefore it is not possible. Alternatives?
Daniel
@danny:mdanny82.selfhost.eu
[m]
Hi, my application ist a runnable jar built with jdk 1.8. Is it possible to use update4j for this? Is there a tutorial which shows the steps from a runnable jar to the auto-updating application?
Mordechai Meisels
@mordechaim
While update4j wasnt designed for jdk8 there are a few forks that packported the project. Check out here.
There aren't any special rules regarding runnable jar files, but update4j will not handle it as runnable. Namely, you'll need to supply the main class the update4j (if you use the default bootstrap setup).
Start update4j as a runnable jar to see a quick reference guide
Sébastien Gonzalez
@SebGonzalez
Hi, I started to use update4j for update my application. I get the exemple bootstrap. I created my config.xml and make download functional. But I have a problem with the launch part
I want to start my application inside the current jvm (from bootstrap)
Currently I can start my business app with"java -classpath 'exemple.jar; exemple2.jar ..." com.me.MainClass
But with the bootstrap I don't succeed in launch it
I add classpath="true" in all jar inside config.xml but I have an error when I launch my businness app :
Caused by: java.lang.IllegalAccessError: class com.eukles.resoposte.AgentResoposteV2 (in unnamed module @0x6dc7625e) cannot access class com.sun.javafx.application.LauncherImpl (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.application to unnamed module @0x6dc7625e
Have you an idea to solve my problem please ?
Mordechai Meisels
@mordechaim
Are your example.jar files also liated in the config?
Do you use the default bootstrap or your own?
Mordechai Meisels
@mordechaim
*listed in the config
Sébastien Gonzalez
@SebGonzalez
Yes I have all my jar in the "<files>"
<files>
<file path="antlr-2.7.7.jar" size="445288" checksum="d0d1c0e2" classpath="true"/>
<file path="aspectjweaver-1.9.6.jar" size="2051606" checksum="b7eba520" classpath="true"/>
<file path="byte-buddy-1.10.19.jar" size="3497763" checksum="2de28ed8" classpath="true"/>
......
</files>
I take the demo-boostrap from here : https://github.com/update4j/demo-bootstrap
Astrid Sawatzky
@astridsawatzky_gitlab
@SebGonzalez maybe this will help: https://stackoverflow.com/questions/59625091/javafx-module-does-not-export-to-unnamed-module
I do not know how to achieve this in update4j.
Sébastien Gonzalez
@SebGonzalez
I tried to add export on the file "javafx-graphics-16.jar" in the config but I have the same error
<file path="javafx-graphics-16.jar" size="306" checksum="3d6046ce" classpath="true">
<addExports>
<exports package="javafx.graphics/com.sun.javafx.application" target="ALL-UNNAMED"/>
</addExports>
</file>