ADDITIONAL SYSTEM INFORMATION :
Windows 10, Java build 14+36-1461
A DESCRIPTION OF THE PROBLEM :
When creating an installer package, jpackage uses the --file-associations command to associate filetypes with the application on install. I have noticed two problems in Windows with this.
1) If there are special characters such as "eÃÂ" in the path to the file, the string passed into the application as an argument will be corrupted.
2) If there are spaces in the path to the file, the path will be split on these spaces, and passed in as multiple entries in the args handed in.
REGRESSION : Last worked in version 14
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create a basic Java 14 application which accepts arguments to its main function and outputs them somehow.
2) Build the project and use jpackage to create an installer while using the --file-associations command to associate a file type with the application.
3) Install the application.
4) Create a file of the associated type which has a special character (such as "eÃÂ") in either the name or the general path (including folder names).
5) Double click the file.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The path passed in should have a string which is encoded properly and which contains the "eÃÂ" as a single character.
ACTUAL -
The path passed in to the application will have corrupted characters instead of the "eÃÂ".
---------- BEGIN SOURCE ----------
All you need is a main method that accepts arguments.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I have not found one. I tried taking the passed string and passing it back and forth into byte arrays using different character encodings, but did not have success.
FREQUENCY : always
Windows 10, Java build 14+36-1461
A DESCRIPTION OF THE PROBLEM :
When creating an installer package, jpackage uses the --file-associations command to associate filetypes with the application on install. I have noticed two problems in Windows with this.
1) If there are special characters such as "eÃÂ" in the path to the file, the string passed into the application as an argument will be corrupted.
2) If there are spaces in the path to the file, the path will be split on these spaces, and passed in as multiple entries in the args handed in.
REGRESSION : Last worked in version 14
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create a basic Java 14 application which accepts arguments to its main function and outputs them somehow.
2) Build the project and use jpackage to create an installer while using the --file-associations command to associate a file type with the application.
3) Install the application.
4) Create a file of the associated type which has a special character (such as "eÃÂ") in either the name or the general path (including folder names).
5) Double click the file.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The path passed in should have a string which is encoded properly and which contains the "eÃÂ" as a single character.
ACTUAL -
The path passed in to the application will have corrupted characters instead of the "eÃÂ".
---------- BEGIN SOURCE ----------
All you need is a main method that accepts arguments.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I have not found one. I tried taking the passed string and passing it back and forth into byte arrays using different character encodings, but did not have success.
FREQUENCY : always
- duplicates
-
JDK-8246042 Non-ASCII characters are not handled correctly in the native launcher
- Resolved
- relates to
-
JDK-8235915 jpackage associations fail when there are spaces in file name or path
- Resolved