How to change icon on .jar desktop shortcut?

Forum rules
Before you post please read how to get help
Post Reply
Level 1
Level 1
Posts: 1
Joined: Wed Feb 04, 2015 12:27 am

How to change icon on .jar desktop shortcut?

Post by Longstreet308 » Wed Feb 04, 2015 7:58 pm

How can I change the icon on a .jar file on the desktop?

I installed Minecraft and got it running just fine. Was able to place the .jar file on the desktop, make it executable, and it opens the game just fine on double-click. But it still looks like, well, a .jar file. I'd kinda like to make it look a little nicer. Right click>Properties>File type options looks like it should allow me to change the icon, but when I try it doesn't apply the change.

What am I missing? I've been using Linux for several years, various distros and DEs, but I'm still figuring things out.

User avatar
Level 1
Level 1
Posts: 24
Joined: Tue Feb 17, 2015 8:23 am

Re: How to change icon on .jar desktop shortcut?

Post by M4he » Tue Feb 17, 2015 8:48 am

  1. Open up the desktop folder with dolphin.
  2. Right click on an empty space and select "Create New" > "Link to Application".
  3. Under the first tab called "General" input a name for the resulting .desktop file
    (the name doesn't really matter, it is only displayed in file managers).
  4. Switch to the third tab called "Application". Input a name for your shortcut (this one will actually be displayed on the desktop).
  5. In the command input field call java to open your .jar file like this:

    Code: Select all

    java -jar "/home/user/some_folder/application.jar"
    (Replace the path above with your actual .jar path, leave the quotes)
  6. Hit "OK". You will not be able to change the icon while creating the link, but you can do afterwards.
    Just right-click the newly created .desktop file and select "Properties", you can click on the icon in the upper left to select a new icon.
If your question/problem got solved, please edit your first post and add [SOLVED] to the title!

Level 1
Level 1
Posts: 9
Joined: Wed Jan 23, 2013 10:52 pm

Re: How to change icon on .jar desktop shortcut?

Post by sg1efc » Wed Jul 15, 2015 1:44 am

Your instructions just worked great for me M4he, to create a desktop icon for Dolphin in Linux Mint Cinnamon. Thank you very much! :)

Post Reply

Return to “KDE”