Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
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.
Ok, i've done a search already and found nothing that helped and posted replies to similar posts but everyone seems to be overlooking my reply and only keeping rappor with whomever started the thread. My question, I would think should be a simple question for even a semi linux guru or and advanced newbie. I've only been using linux for 3 days now starting with lindows, but i didn't like the fact you had to pay for free software. So I heard mandrake would be a good start, which it has been great so far. Especially in KDE 3.0. So far i found answers to most of my questions by searches. Except this one; when i was running lindows and typed the command "java -jar <filename>.jar" the file started. Now, in mandrake I try this and get "unknown command" or something like it. I though it probably had to do with security because i had j2re-1_4_1_01 installed. So I set my security back to standard from paranoia (I'm messing with server stuff so i wanted to make sure it would be a hassle for someone to poke at my system) and it still didn't work.
Can anyone tell me how to install jar files?
Or tell me what to do about the java command.
The software i'm trying to install is LimeWire. I even tried the .sh file but in that file itself has a java command which comes up "line 14: java: unknown command".
Please someone help me or at the least if this question is actually more difficult than it sounds tell me.
thanks
Yeah, it's a little bit more than you'd think... But no worries on difficulty level, after all, that's a good way to learn.
Anyway, you need to see if the "java" directory is in your PATH. So, you'll wanna first find the java directory, if you installed it yourself, then you probably know where it's at, if it came with your distro, then you might have to do a little hunting around. Try this as a start:
find /usr | grep java
Also, just for a hope, check in /usr/local/java to see if it's there.
Anyway, once you pin that down (make sure you have the correct directory) and then check your PATH:
echo $PATH
This should display your current path either for the system or the current user, or both. If you don't see the directory for the java folder that you found earlier, then you'll have to add it to your PATH. A "quick" way to do that is to export it, which is probably the easiest, but not long lasting way (will go away after a reboot, or logout) or this way:
Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines (replacing directories according to your java setup of course):
Then make the file executable (meaning in a terminal, as root type):
chmod +x java.sh
Ok, so now you SHOULD have that all taken care of, java is in your PATH (you can check with the above command: echo $PATH) and now you can go on with the rest of the java fun.
Ok i created the file 'java.sh'. How to create it i'm assuming with just a text editor? I used kedit. Then I did the chmod command in the terminal under root in the profile.d directory. Then i typed 'echo $PATH' and still no java in there. Am i suppose to run the java.sh file?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.