ADDITIONAL SYSTEM INFORMATION :
Windows 11 with Early Access JDK25 and JDK26
A DESCRIPTION OF THE PROBLEM :
This is a minor issue and may be expected behaviour for JDK25+JDK26 but I could not find a JDK bug report showing this change of behavour - it is different from jpackage in JDK14 through JDK24.
jpackage with --type app-image writes read-only exe files.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use jpackage on any project which works with --type msi, but switch to --type app-image to record the directory structure. Example command line:
md build\app-image
jpackage --dest "build/jpackage.dir" --name "Bug" --input "build/app-image" --module-path "C:\dev\mods" --add-modules example.bug --type app-image --win-console --module example.bug/hello.Main
=> Writes files including build/jpackage.dir/Bug/Bug.exe
Cleaning the project structure now fails unless permissions of each EXE file is edited.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
attrib build/jpackage.dir/Bug/Bug.exe
=>
A build\jpackage.dir\Bug\Bug.exe
ACTUAL -
attrib build/jpackage.dir/Bug/Bug.exe
=>
A R build\jpackage.dir\Bug\Bug.exe
---------- BEGIN SOURCE ----------
Any project. My minimal case has module-info.java:
module example.bug {
exports hello;
}
and hello/Main.java compiled to a jar:
public class Main {
public static void main(String... args) {
System.out.println("Hello World");
}
}
---------- END SOURCE ----------
Windows 11 with Early Access JDK25 and JDK26
A DESCRIPTION OF THE PROBLEM :
This is a minor issue and may be expected behaviour for JDK25+JDK26 but I could not find a JDK bug report showing this change of behavour - it is different from jpackage in JDK14 through JDK24.
jpackage with --type app-image writes read-only exe files.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use jpackage on any project which works with --type msi, but switch to --type app-image to record the directory structure. Example command line:
md build\app-image
jpackage --dest "build/jpackage.dir" --name "Bug" --input "build/app-image" --module-path "C:\dev\mods" --add-modules example.bug --type app-image --win-console --module example.bug/hello.Main
=> Writes files including build/jpackage.dir/Bug/Bug.exe
Cleaning the project structure now fails unless permissions of each EXE file is edited.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
attrib build/jpackage.dir/Bug/Bug.exe
=>
A build\jpackage.dir\Bug\Bug.exe
ACTUAL -
attrib build/jpackage.dir/Bug/Bug.exe
=>
A R build\jpackage.dir\Bug\Bug.exe
---------- BEGIN SOURCE ----------
Any project. My minimal case has module-info.java:
module example.bug {
exports hello;
}
and hello/Main.java compiled to a jar:
public class Main {
public static void main(String... args) {
System.out.println("Hello World");
}
}
---------- END SOURCE ----------