desktop icon will not open software

Issues related to applications and software problems
Post Reply
LMHmedchem
Posts: 53
Joined: 2011/03/22 17:32:25
Location: Boston

desktop icon will not open software

Post by LMHmedchem » 2023/11/04 18:55:16

Hello,

I have been trying to add some desktop icons to my CentOS 7 KDE installation. You used to be able to just add a launcher (in some Linux flavours) but I can't seem to find those anyone. It seems an odd feature to not be very easy and straightforward to manipulate.

Since I can't find a launcher, I copied a .desktop file from /usr/share/applications/ and placed it on the desktop.

The file I am trying to run is,

Code: Select all

/home/username/version_folder/app_gui.jar
and the file is run as,

Code: Select all

java -jar app_gui.jar
The .desktop file reads,

Code: Select all

[Desktop Entry]
Categories=System;Settings;X-Red-Hat-Base;X-Fedora;
Comment[en_US]=Open app java GUI
Comment=Open app java GUI
Encoding=UTF-8
Exec=java -jar /home/username/version_folder/app_gui.jar
GenericName[en_US]=app_GUI
GenericName=app_GUI
Icon=/home/username/version_folder/app.ico
MimeType=
Name[en_US]=app_GUI
Name=wMc
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
The icon is correct, so the system is reading that path correctly. When I double click on the icon I just get the bouncing icon for a while and a tray entry but then both go away and the program gui never opens.

I used to be able to do,

Code: Select all

java -jar  /home/username/version_folder/app_gui.jar
and get the file to run. But now if I do that I get and error,

Code: Select all

$ java -jar ./app_GUI.jar
Error: Invalid or corrupt jarfile ./app_GUI.jar
Now I am not sure if the issue is the .desktop file or the .jar file.

The first time I double clicked on the icon I got a system message asking for permission to run the .jar file. I am not sure what program that message was from. I allowed permission, but the file never opened.

There are allot of possibilities for what the problem is but I'm not sure how to run this down.

Suggestions would be appreciated,

LMHmedchem

User avatar
TrevorH
Site Admin
Posts: 33269
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: desktop icon will not open software

Post by TrevorH » 2023/11/04 19:16:27

Error: Invalid or corrupt jarfile ./app_GUI.jar
Your jar file is corrupt. Replace it from backups or reinstall whatever it was that supplies it.

Also, it's probably wise to include the full path to things you want to execute - e.g. /usr/bin/java not just 'java'.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

LMHmedchem
Posts: 53
Joined: 2011/03/22 17:32:25
Location: Boston

Re: desktop icon will not open software

Post by LMHmedchem » 2023/11/04 20:33:37

Thanks,

I replaced the jar file and now it works. I also modified the path to java as you suggested.

I am wondering how the .jar file got corrupted. I used it from the command line and it was fine. Then I set up the .desktop icon and tried it that way and it would not open. I still don't know what application gave me the warning message and asked for permission to run the jar file when I double clicked on the desktop icon.

Any ideas as to what happened to the .jar file?

LMHmedchem

Post Reply