running a java application and running it from KDE menu
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by gerrysw11
Thank you for replying, I'm sorry my post was unclear, I thought I'd said that
yes
from the command line, in the right directory
> java -jar application.jar works
it is when I try to get "clever" that I run into problems.
I'd like to be able to launch the application using an icon on my KDE desktop
Well, I've just created a shortcut on my desktop to a java app on my machine. Apart from it complaining that it can't find it's "manifest file", it does seem to launch it up to that point.
Under the "Permissions" tab I have "Is executable" ticked. Under the "Application" tab;
I very much doubt it matters what you put into the "Description" field.
In the "Command" field I have "java -jar /home/my_username_here/java_app_name_here.jar"
I have nothing in the "Work path" field. I do have the option "Run in terminal" ticked, but I still get the same error at the command-line tho.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by gerrysw11
I removed the space from the directory name "just in case" and edited the command line accordingly
the "is executable" radio button is checked
whether or not a work path is required I do not understand why the application doesn't launch
From the command line the .jar file will not launch
java -jar /directory/file.jar
but will launch from within the directory
directory/>java -jar file.jar
nothing works in the KDE menu entry
Good you removed the space, as that would confuse the system and cause it not to find your app. If there is really a space in the folder name, you need to escape the "special meaning" by using a '\', so let's say that you have a folder called "my folder"; the path you would need would be (for example) "/home/my\ folder/". Sounds like that could be your problem or maybe a $PATH issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.