Bugzilla – Bug 1215020
Java:packages: Apply `java -jar` as default file association for `.jar`.
Last modified: 2023-09-06 05:37:39 UTC
Created attachment 869297 [details] This is the detailed configuration that should be added automatically as a .desktop file. This is possible by adding a .desktop file adherent to the XDG specs.
Created attachment 869298 [details] This shows a slightly higher level (but relevant) configuration pane.
Created attachment 869299 [details] This shows a higher level (but relevant) configuration pane.
https://askubuntu.com/a/30214/1002900 describes why I use %U in the screenshots provided.
This is not as good idea as that. Because only jar files that specify their classpath and main class can be auto-executed. Also, executing jar files by default is a security risk, since it is another executable that can be vector of infection. The additional step for the user to download the file and then run java -jar means that they know what they are doing. For people that really need that, it is possible to do that configuration by themselves as you mentioned in your screenshots.
*** This bug has been marked as a duplicate of bug 982447 ***