jpackage windows --version-swap --icon-swap weirdness

Andy Herrick andy.herrick at oracle.com
Fri Feb 8 16:35:27 UTC 2019


We have recently moved this functionality from jpackage.exe command line 
to a native library, (JDK-8217317).

That being said, it sounds like there was a bug in the implementation, 
and that bug was moved with the code.

I have filed bug JDK-8218681 
<https://bugs.openjdk.java.net/browse/JDK-8218681> to track this.

/Andy



On 2/7/2019 2:25 PM, Jon Harper wrote:
> Hi list,
> I'm using jpackage EA from https://jdk.java.net/jpackage/ to create a
> windows executable on windows 2012 R2 (jpackager create-image ...)
> The resulting exe file doesn't have the correct vendor and version
> information (it has openjdk 13 instead of my vendor name and version).
> It has the correct logo.
>
> Can anyone help with this, or is anyone interested ? Has anyone made
> the icon and vendor work with exes ?
>
> I did some troubleshooting, including writing my own program that
> updates the version using  BeginUpdateResource, UpdateResource and
> EndUpdateResource, I see very differing behaviors depending on what
> exe I change.
>
> With an exe that I compiled myself using mingw32 (gcc 5.1), calling
> jpackager --icon-swap and jpackager --version-swap on it works.
>
> Using a copy of git.exe from git for windows portable, everytime I
> call jpackage --version-swap (or my own program) on this exe AFTER
> having done a jpackage --icon-swap on it, I get a crash and the exe is
> not updated (updating the version with my simple program has the same
> behavior). Calling jpackage --version-swap first and then jpackage
> --icon-swap results in an exe that has the correct icon and correct
> versioninfo (although this exe is now "poisonned", you can't change
> its version again..)
>
> Running jpackage --version-info again on the binary generated by
> jpackage doesn't do anything but doesn't crash.
>
> The behavior is the same whether I use my own icon (a 48x48 icon
> created with the gimp) or if replace my icon file with
> javalogo_white_48.ico
>
> I can run more tests if necessary.
> Any help is appreciated,
>
> Cheers,
> Jon



More information about the core-libs-dev mailing list