Bug 1215020 - Java:packages: Apply `java -jar` as default file association for `.jar`.
Summary: Java:packages: Apply `java -jar` as default file association for `.jar`.
Status: RESOLVED DUPLICATE of bug 982447
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: 3rd party software (show other bugs)
Version: unspecified
Hardware: All openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Fridrich Strba
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 19:26 UTC by roke beedell
Modified: 2023-09-06 05:37 UTC (History)
0 users

See Also:
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. (58.90 KB, image/png)
2023-09-05 19:26 UTC, roke beedell
Details
This shows a slightly higher level (but relevant) configuration pane. (68.59 KB, image/png)
2023-09-05 19:27 UTC, roke beedell
Details
This shows a higher level (but relevant) configuration pane. (61.55 KB, image/png)
2023-09-05 19:27 UTC, roke beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***