Bug 1215020

Summary: Java:packages: Apply `java -jar` as default file association for `.jar`.
Product: [openSUSE] openSUSE.org Reporter: roke beedell <rokejulianlockhart+1674683091>
Component: 3rd party softwareAssignee: Fridrich Strba <fstrba>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <screening-team-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: This is the detailed configuration that should be added automatically as a .desktop file.
This shows a slightly higher level (but relevant) configuration pane.
This shows a higher level (but relevant) configuration pane.

Description roke beedell 2023-09-05 19:26:34 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.
Comment 1 roke beedell 2023-09-05 19:27:18 UTC
Created attachment 869298 [details]
This shows a slightly higher level (but relevant) configuration pane.
Comment 2 roke beedell 2023-09-05 19:27:43 UTC
Created attachment 869299 [details]
This shows a higher level (but relevant) configuration pane.
Comment 3 roke beedell 2023-09-05 22:18:40 UTC
https://askubuntu.com/a/30214/1002900 describes why I use %U in the screenshots provided.
Comment 4 Fridrich Strba 2023-09-06 05:36:06 UTC
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.
Comment 5 Fridrich Strba 2023-09-06 05:37:39 UTC

*** This bug has been marked as a duplicate of bug 982447 ***