This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Pinning Java Applications to Task Bar (Icon-only Task Man.)

Tags: None
(comma "," separated)
fiechr
Registered Member
Posts
1
Karma
0
I have a small issue which appears for some Java applications and some not.

While the Application Launcher (Start Menu) starts the program perfectly fine, I can not start the application again (after closing it), when I pin it to the Task Manager.
I only get a "'java' command or folder not found" message.

I have tried to find out what's the difference between the Java apps that work this way and the ones which doesn't. Most Java programs get started by calling a script, which in turn calls the java runtime executable. Maybe the PATH isn't available or it has something to do with the shell that is used? But why does it work with the Launcher?

This is the path/command from a pinned Java application in the task bar, that works fine:
Code: Select all
diylc


Code: Select all
$ which diylc
/usr/bin/diylc

$ cat /usr/bin/diylc
#!/bin/sh
cd /usr/share/diylc
sh ./run.sh

$ cat /usr/share/diylc/run.sh
java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib org.diylc.DIYLCStarter


More info about app files:
https://aur.archlinux.org/packages/diylc/

This is from one that gives me the error when starting from the pined icon:
Code: Select all
jdotxt %F


Code: Select all
$ which jdotxt
/usr/bin/jdotxt

$ cat /usr/bin/jdotxt
#!/bin/sh
java -jar "/usr/share/java/jdotxt/jdotxt.jar"


More info about app and files:
https://aur.archlinux.org/packages/jdotxt/


In the end, both call "java".
But one does seem to find and start it without issues, the other one only gives me the error message.
Both start fine using the launcher (start menu, application menu) -- but not when using the pinned link on the task bar!


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]