Ubuntu 16.04 running 2.99pre5 - Error launching from Desktop

Subscribe to Ubuntu 16.04 running 2.99pre5 - Error launching from Desktop 2 post(s), 1 voice

 
Avatar hal 2 post(s)

Thanks for all your hard work on JBidwatcher throughout the years. It’s really appreciated and you’ve done a great job.

As JBidwatcher 2.5.6 had become error-prone in recent months, with lots of duplicates in the listings, I decided to upgrade to 2.99pre5. It works fine from a terminal, but fails to start when launched from a Desktop launcher. This is my setup…

~/Desktop/jbidwatcher.desktop:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Name=jbidwatcher
Exec=/home/Programs/jbidwatcher/JBidwatcher/jbidwatcher.sh
Terminal=true
MultipleArgs=false
Icon=/usr/share/icons/jbidwatcher.jpg
Type=Application
Categories=Application
MimeType=

To see the error, set Terminal to true, and put the following lines at the beginning and end of jbidwatcher.sh:

printf 'press [ENTER] to continue'
read _

This is the error that’s produced:

Error: Could not find or load main class com.jbidwatcher.app.JBidWatch

As I said, running jbidwatcher.sh from a terminal works fine, but it’s not very convenient.

Any help with this would be much appreciated.

 
Avatar hal 2 post(s)

I found the solution. Note the added Path setting.

Now that it’s working, set Terminal back to false.

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Name=jbidwatcher
Exec=/home/Programs/jbidwatcher/JBidwatcher/jbidwatcher.sh
Path=/home/Programs/jbidwatcher/JBidwatcher
Terminal=false
MultipleArgs=false
Icon=/usr/share/icons/jbidwatcher.jpg
Type=Application
Categories=Application
MimeType=

Read a basic guide on Unity Launchers here and further help here