-
Bug
-
Resolution: Fixed
-
P4
-
17
-
b22
-
x86_64
-
windows_10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289947 | 17.0.5-oracle | Alexey Semenyuk | P4 | Resolved | Fixed | b02 |
JDK-8291485 | 17.0.5 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
ADDITIONAL SYSTEM INFORMATION :
java 17, windows 10
A DESCRIPTION OF THE PROBLEM :
First, apologies if this is in the wrong place. I'm unfamilar with the jdk ecosystem and it doesn't seem like other repositories have issue trackers. If this is the wrong place, please point me in the right direction :pray:
This was seen on
![Screenshot from 2022-02-22 11-16-20](https://user-images.githubusercontent.com/3514957/155183799-7f74c11d-89ed-4066-9126-e0ba858aad23.png)
If you package up an application that has `$$` in the class file this will not work with `wix` (the tool used to generate an `msi` file on windows).
This is because the wix pre-processor parses `$$` as a _single_ escaped `$`.
![Screenshot from 2022-02-22 07-48-02](https://user-images.githubusercontent.com/3514957/155182083-04903556-ccc6-4a03-bd68-2bc1dc7f55a3.png)
![Screenshot from 2022-02-22 07-47-27](https://user-images.githubusercontent.com/3514957/155182087-e21b3a94-002f-4a58-abab-1a0bf141290a.png)
for more information see
- https://github.com/bitcoin-s/bitcoin-s/issues/4116
- https://github.com/wixtoolset/issues/issues/6734
- https://stackoverflow.com/questions/67494578/jpackage-on-windows-the-system-cannot-find-file-error-103/71225242#71225242
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to package something with `jpackage` on windows that contains a class file with `$$` in the file name
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It automatically escapes the `$$` the wix pre-processor requires, see: https://github.com/wixtoolset/issues/issues/6734
ACTUAL -
File not found due to wix dropping a `$` in the file name. The result files wix searches have incorrect file names due to `$` missing.
For example, this is the error message i see
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage10810086746577514793\config\bundle.wxf(1578) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage10810086746577514793\images\win-msi.image\BundleGUI\app\classes\org\bitcoins\bundle\gui\NeutrinoConfigPane$anon$7.class'
and the real file name is
NeutrinoConfigPane$$anon$7.class
---------- BEGIN SOURCE ----------
see: https://github.com/bitcoin-s/bitcoin-s/tree/2022-02-21-windows-jpackage
and the file that actually tries to use jpackage and build an msi
https://github.com/bitcoin-s/bitcoin-s/blob/7adb862775c3a5bee1cb9b4f2605258e5076d354/.github/workflows/release.yml#L162
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No known workaround at this time.
FREQUENCY : always
java 17, windows 10
A DESCRIPTION OF THE PROBLEM :
First, apologies if this is in the wrong place. I'm unfamilar with the jdk ecosystem and it doesn't seem like other repositories have issue trackers. If this is the wrong place, please point me in the right direction :pray:
This was seen on
![Screenshot from 2022-02-22 11-16-20](https://user-images.githubusercontent.com/3514957/155183799-7f74c11d-89ed-4066-9126-e0ba858aad23.png)
If you package up an application that has `$$` in the class file this will not work with `wix` (the tool used to generate an `msi` file on windows).
This is because the wix pre-processor parses `$$` as a _single_ escaped `$`.
![Screenshot from 2022-02-22 07-48-02](https://user-images.githubusercontent.com/3514957/155182083-04903556-ccc6-4a03-bd68-2bc1dc7f55a3.png)
![Screenshot from 2022-02-22 07-47-27](https://user-images.githubusercontent.com/3514957/155182087-e21b3a94-002f-4a58-abab-1a0bf141290a.png)
for more information see
- https://github.com/bitcoin-s/bitcoin-s/issues/4116
- https://github.com/wixtoolset/issues/issues/6734
- https://stackoverflow.com/questions/67494578/jpackage-on-windows-the-system-cannot-find-file-error-103/71225242#71225242
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to package something with `jpackage` on windows that contains a class file with `$$` in the file name
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It automatically escapes the `$$` the wix pre-processor requires, see: https://github.com/wixtoolset/issues/issues/6734
ACTUAL -
File not found due to wix dropping a `$` in the file name. The result files wix searches have incorrect file names due to `$` missing.
For example, this is the error message i see
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage10810086746577514793\config\bundle.wxf(1578) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage10810086746577514793\images\win-msi.image\BundleGUI\app\classes\org\bitcoins\bundle\gui\NeutrinoConfigPane$anon$7.class'
and the real file name is
NeutrinoConfigPane$$anon$7.class
---------- BEGIN SOURCE ----------
see: https://github.com/bitcoin-s/bitcoin-s/tree/2022-02-21-windows-jpackage
and the file that actually tries to use jpackage and build an msi
https://github.com/bitcoin-s/bitcoin-s/blob/7adb862775c3a5bee1cb9b4f2605258e5076d354/.github/workflows/release.yml#L162
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No known workaround at this time.
FREQUENCY : always
- backported by
-
JDK-8289947 jpackage does not work if class file has `$$` in the name on windows
- Resolved
-
JDK-8291485 jpackage does not work if class file has `$$` in the name on windows
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/cd6f6596
-
Commit openjdk/jdk/29395534
-
Review openjdk/jdk17u-dev/597
-
Review openjdk/jdk/8613
(1 links to)