Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-01-22 15:50:00

cmcanulty
Member
From: Beulah, Michigan
Registered: 2014-05-10
Posts: 268

add java app to whisker menu

I have successfully added a java app and a shortcut on the desktop but can't get it added to whisker menu I tried this

xfce4-terminal -e "java -jar /home/usertest/java/testpad.jar"   /home/cmcanulty/jin-2.14.1/jin

with no luck. I can run it from terminal with ./jin

the desktop shortcut has this as the command

/home/cmcanulty/jin-2.14.1/jin

Also now T have 3 jin in the games menu which I can't
delete as they don't show in edit menus or my home/.config/menus

I googled this quite a bit without success, thank you

Last edited by cmcanulty (2019-01-22 15:57:16)

Offline

#2 2019-01-22 21:18:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,491

Re: add java app to whisker menu

cmcanulty wrote:

Also now T have 3 jin in the games menu which I can't
delete as they don't show in edit menus or my home/.config/menus

Look in ~/.local/share/applications and remove the 3 errant .desktop files


I have successfully added a java app and a shortcut on the desktop but can't get it added to whisker menu I tried this

xfce4-terminal -e "java -jar /home/usertest/java/testpad.jar"   /home/cmcanulty/jin-2.14.1/jin

with no luck. I can run it from terminal with ./jin

the desktop shortcut has this as the command

/home/cmcanulty/jin-2.14.1/jin

Create the file ~/.local/share/applications/jin.desktop with the following content:

[Desktop Entry]
Type=Application
Icon=/home/cmcanulty/jin-2.14.1/icon.png
Name=Jin Chess Client
Comment=Client for various chess servers	
Categories=Game;
Exec=/home/cmcanulty/jin-2.14.1/jin
Path=/home/cmcanulty/jin-2.14.1
StartupNotify=true
Terminal=false

This .desktop file works for me.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2019-01-22 22:28:05

cmcanulty
Member
From: Beulah, Michigan
Registered: 2014-05-10
Posts: 268

Re: add java app to whisker menu

Thanks so much but I had the desktop shortcut, what I can't do is add it to the whisker menu, see my post. But I added it to the menu using the command you gave in the desktop file:
Exec=/home/cmcanulty/jin-2.14.1/jin
and that worked for whisker! Thanks

Last edited by cmcanulty (2019-01-22 22:31:24)

Offline

#4 2019-02-24 21:48:25

ampersun
Member
Registered: 2015-05-14
Posts: 3

Re: add java app to whisker menu

To run a (jar) file and have the menu item show up in the Whisker Menu:

Open "menulibre" (or the default menu editor of your choice" (in my case... the "win" key shortcut opens Whisker Menu> "Search Window", type Menu, either Menu Editor or Main Menu options show in Whisker menu "apps column", Choose whatever option you have, mine is Menu Editor (menulibre).

My Example jar file is for LazyMan

MENULIBRE:
Left column of menulibre, choose the category you want to use by left clicking on the category item (in my case I choose internet). The right panel now changes to show the category you selected.
At the top left you should see a Green "+" sign. Left click that "+" sign and choose "Add Launcher". Right panel now changes to show the launcher pane.
Where it says "New Launcher" left ckick to highlight this area and then type the name you wish to use and press <enter> (in my case I type "LazyMan").
Where it says "A small descriptive blurb about this application." type your blurb and press <enter> (in my case "Watch live sports").
The icon box next to these two items, left click, choose"Browse Icons", search for your icon (in my case I type "vlc" in the search window and choose the vlc icon that appears, then select "Apply" at the bottom to get back to the "launcher pane" in menulibre.
Once back in the "launcher pane", under "Application Details" where it says "Command" Type "java -jar /the/path/to/your/jar/file/"  without the quotes and press <enter> (in my case "java -jar /home/sexierthanmost/Programs/Lazyman/LazyMan.jar").

At the top of the menulibre window choose the "Save Icon" and close "menulibre".

Open whisker menu in your usual way and just start typing the name you used in the "New Launcher" field that you entered in menulibre. There in the Whisker menu you should see your newly created launcher with your chosen icon and chosen New Launcher name and a descriptive blurb. Left click or just hit <enter> if your program is highlighted. In my case i see The "Vlc Icon", "LazyMan", "Watch live sports." Lazyman is selected and so I just hit <enter> and Lazyman starts!

No desktop file to mess with! Easy-peasy, and sexier-than-most!

Enjoy!

Offline

#5 2019-02-24 23:55:58

cmcanulty
Member
From: Beulah, Michigan
Registered: 2014-05-10
Posts: 268

Re: add java app to whisker menu

Thanks that does it

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 536.72 KiB (Peak: 537.56 KiB) ]