Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3096  / 2 Years ago, wed, january 26, 2022, 5:57:16

How do I setup Unity to right-click-open a java file? I have tried to "set the default action" but the action is not listed and I cannot add an action from the menus. When I right-click-properties then click the "open with" tab, the "add" button is greyed out.



I write alot of java software. I need the ability to open it from the Desktop.


More From » java

 Answers
2

Open /usr/share/applications and look for a file named "OpenJDK Java 6 Runtime".
If it doesn't exists create a file named /usr/share/applications/openjdk-6-java.desktop
with the following contents:



[Desktop Entry]
Name=OpenJDK Java 6 Runtime
Comment=OpenJDK Java 6 Runtime
Exec=cautious-launcher %f /usr/lib/jvm/java-6-openjdk-i386/bin/java -jar
Terminal=false
Type=Application
Icon=openjdk-6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true


You should change the "/usr/lib/jvm/java-6-openjdk-i386/bin/java" part of Exec to the location of java on your system. Then reboot and the option should be there.


[#39738] Wednesday, January 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shionnky

Total Points: 276
Total Questions: 104
Total Answers: 108

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
shionnky questions
;