Double-click the file to run jar deepin

table of Contents

problem

In deepin we need to run java -jar jar file to run jar file, but each does so much trouble, we can solve this problem by creating a java launcher.

solution

In the directory / usr / share / applications java.desktop create a file, the file contents are as follows (requires root privileges to write)

[Desktop Entry]
Name=java
Comment=jar run.
Exec=/usr/bin/java -jar %f
Terminal=false
Type=Application
Icon=openjdk-8
Categories=Development;
MimeType=application/java-archive,application/x-java-archive,application/x-jar

So there will be a Java icon
to find the jar file, right-choice Open java, so that later you can double-click to open the jar files.

Released eight original articles · won praise 11 · views 7497

Guess you like

Origin blog.csdn.net/zss192/article/details/104432273