ADDITIONAL SYSTEM INFORMATION :
Windows 10 / Java SDK 21
A DESCRIPTION OF THE PROBLEM :
Under certain conditions, such as setting a --temp directory that is a subdirectory of the input directory, including the path in the --main-jar parameter, or setting the --i and --d directories to the same value, jpackage will recurse infinitely, creating an extremely deep directory structure that's difficult to delete on Windows machines. The software should reasonably check if this is going to happen and print out an appropriate error message.
See the discussion at https://stackoverflow.com/questions/69412663/jpackage-doesnt-generate-working-exe-and-bugs-folders.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run jpackage using any of the three conditions listed in the description.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jpackage prints, e.g., a "The --i directory cannot be the same as the --d directory" error and exits without action.
ACTUAL -
The software eventually crashes with a "java.io.IOException: Cannot access file with path exceeding 32000 characters" error and an undeletable folder tree is created. Hence, be careful.
---------- BEGIN SOURCE ----------
Any executable JAR file will work.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Carefully avoid any of the conditions that create the explosion.
FREQUENCY : always
Windows 10 / Java SDK 21
A DESCRIPTION OF THE PROBLEM :
Under certain conditions, such as setting a --temp directory that is a subdirectory of the input directory, including the path in the --main-jar parameter, or setting the --i and --d directories to the same value, jpackage will recurse infinitely, creating an extremely deep directory structure that's difficult to delete on Windows machines. The software should reasonably check if this is going to happen and print out an appropriate error message.
See the discussion at https://stackoverflow.com/questions/69412663/jpackage-doesnt-generate-working-exe-and-bugs-folders.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run jpackage using any of the three conditions listed in the description.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jpackage prints, e.g., a "The --i directory cannot be the same as the --d directory" error and exits without action.
ACTUAL -
The software eventually crashes with a "java.io.IOException: Cannot access file with path exceeding 32000 characters" error and an undeletable folder tree is created. Hence, be careful.
---------- BEGIN SOURCE ----------
Any executable JAR file will work.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Carefully avoid any of the conditions that create the explosion.
FREQUENCY : always
- is blocked by
-
JDK-8342576 [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions
-
- Resolved
-
-
JDK-8342609 jpackage test helper function incorrectly removes a directory instead of its contents only
-
- Resolved
-
- relates to
-
JDK-8343610 InOutPathTest jpackage test produces invalid app image on macOS
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/568b07a0
-
Review(master) openjdk/jdk/21550