-
Notifications
You must be signed in to change notification settings - Fork 25
ZipException when using updatefx-app #16
Comments
Same is happening with me too. I am using the 1.5 version of the app with java version "1.8.0_45" |
Hey guys, Sorry about this. I've been distracted lately with other things. I'll try and make space to investigate soon. How did your 1.jar zip get built? Is it actually indeed a valid zip file? |
How can I verify if its a "valid" zip file? At least I can open it with the 7Zip application so I assume it's valid. My jar file is created by a gradle build using the shadow plugin (which is similar to mavens shade plugin). Is there a possibility to use updatefx without packaging all dependencies in one single "fat-jar"? In some use cases (like using CDI/WELD for dependency injection) using shadow/shade plugin is causing problems because files with the same name/path will be overwritten in the resulting jar file. |
Re: files being overwritten. That shouldn't matter because the files should be identical anyway. If they are NOT identical then you have a very unstable situation because you presumably have two components that expect the same class to behave differently. Use the maven enforcer plugin or gradle equivalent to check that you don't have such version conflicts. OK, I haven't used the gradle plugin, but it'd be weird if it was different. You can use UpdateFX without the bundling, but then it's up to you to ensure the javapackager puts all the needed jars on the classpath and, of course, they then cannot be updated. |
The problem is not so much for classes but for configuration files. For example CDI/Weld searches for all JAR-files on the classpath that have a 'META-INF/beans.xml' file in them. It ignores all other jars. This doesn't work anymore if JAR files are merged. Another example is logging configuration files. But this is off-topic anyway. ;-) I think with a little hacking this should be possible with gradle/maven:
Of course, as you say, this way dependency jars couldn't be updated. |
Ah, I see. I don't have any experience with Weld. Really, I need to go back and do some proper UpdateFX hacking to make a version 2. It would:
That should make updates much smaller and faster still. However, the multi-jar thing would presumably complicate class loading. |
I pulled the source, I commented out line 37: output.setLevel(0) in https://github.com/vinumeris/updatefx/blob/master/app/src/main/java/com/vinumeris/updatefx/tools/ProcessZIP.kt, packaged, and it ran fine. Not sure what other implications this might have though. |
Less efficiency, basically (larger patches). You may not care about this. |
I'm getting a
java.util.zip.ZipException
when following your step-by-step tutorial:The text was updated successfully, but these errors were encountered: