1

I have a modular java application that I'm trying to launch via a desktop file in ~/.local/share/applications:

[Desktop Entry]
Type=Application
Name=Converter
Path=/home/craig/ca.footeware.converter
Exec=sh -c "/usr/bin/java -p swt.jar:ca.footeware.converter.jar:ca.footeware.converter.temperature.jar:ca.footeware.converter.length.jar -m ca.footeware.converter/ca.footeware.converter.Converter"
Icon=/home/craig/ca.footeware.converter/converter.svg
Terminal=false
Categories=Utility;
StartupWMClass=SWT

I can run gtk-launch ca.footeware.converter.desktop and it works.

I can run the exec statement at cli (in the ~/ca.footeware.converter folder) and it works.

But when I click the Converter shortcut in overview the application does not open. How do I troubleshoot this?

6
  • You could try changing the Terminal=false to Terminal=true and check for a terminal popping up. Alternatively, you could try tedirecting stdout and stderr to a file and investigating that. Commented Nov 20, 2024 at 1:20
  • With both Terminal=true and Terminal=false there is a brief flash of a terminal but the output, if any, isn't visible. I tried outputting to a logfile but one wasn't created. Commented Nov 20, 2024 at 1:52
  • I finally got a logfile but it's empty :( Commented Nov 20, 2024 at 2:48
  • How did you get the logfile? Did you redirect both stdout and stderr? Commented Nov 20, 2024 at 12:42
  • I tried both Exec=sh -v -c "/usr/bin/java -p swt.jar:ca.footeware.converter.jar:ca.footeware.converter.temperature.jar:ca.footeware.converter.length.jar -m ca.footeware.converter/ca.footeware.converter.Converter" &> logfile and Exec=sh -v -c "/usr/bin/java -p swt.jar:ca.footeware.converter.jar:ca.footeware.converter.temperature.jar:ca.footeware.converter.length.jar -m ca.footeware.converter/ca.footeware.converter.Converter &> logfile" but got empty logfiles in both cases. Commented Nov 20, 2024 at 13:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.