There is no jni library for java jpackage code to call.
As a result some operations are done by executing other commands that could be better accomplished in native code.
1.) the jpackage executable itself is invoked with args --icon-swap and --version-swap to modify the launcher to have the proper icon and version. The code to handle this in jpackager should be moved to a new jpackage.dll and called directly.
This will allow jpackage to be built identically as on linux and mac, with no additional code.
2.) WinRegistry.readRegistry() executes "reg query <key>" to read a registry value. This could easily be implemented in jni function.
Not sure if there is other code that could be better implemented in native code but at least these two cases.
As a result some operations are done by executing other commands that could be better accomplished in native code.
1.) the jpackage executable itself is invoked with args --icon-swap and --version-swap to modify the launcher to have the proper icon and version. The code to handle this in jpackager should be moved to a new jpackage.dll and called directly.
This will allow jpackage to be built identically as on linux and mac, with no additional code.
2.) WinRegistry.readRegistry() executes "reg query <key>" to read a registry value. This could easily be implemented in jni function.
Not sure if there is other code that could be better implemented in native code but at least these two cases.
- duplicates
-
JDK-8212536 Modify WindowsRegistry.java to use registry APIs directly
- Closed
- relates to
-
JDK-8217269 jpackage Makefile improvments
- Resolved
-
JDK-8218681 Windows exe's generated by jpackage have wrong info
- Resolved