Results 1 to 4 of 4
Hi all im new to linux, this is my 2nd distribution. Previously i was using fedora core 1, it was too outdated for me to use the programs i wanted ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-16-2007 #1Just Joined!
- Join Date
- Jan 2007
- Posts
- 2
Java problem - executable jar files open as archive
Hi all im new to linux, this is my 2nd distribution. Previously i was using fedora core 1, it was too outdated for me to use the programs i wanted so i upgraded to mandriva 2007.
I downloaded GCCC a java chat client, which ran just fine on fc1, but after installing java on mdv2007, i can't get the file to execute. The file in question is gccc.jar, when i clicked it on fc1 it opened the program. but when i click it in mandriva it opens the jar in ark. I did some research and what i found was to use the command java -jar javafile.jar to execute a java program, and I've tried to use the "Java -jar gccc.jar" command in terminal, but it says "bash: java: command not found". I verified that java is installed (/usr/java/jre1.5.0_10) and i'm totally lost about getting this to work. I tried to login to root to do it, but when i try it says root login not allowed. any assistance is appreciated
jason
- 01-16-2007 #2
Make sure you're typing java -jar somejarfile.jar and *not* Java -jar somejarfile.jar. Linux is case sensitive. Also, if you're sure Java has been properly installed, try using an absolute path to the java executable:
Code:/usr/java/jre1.5.0_10/bin/java -jar nameofyourjarfile.jar
Registered Linux user #270181
TechieMoe's Tech Rants
- 01-16-2007 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 2
I tried java -jre gccc.jar, it didnt work. said java was unknown command. However, using the /usr/java/jre1.5.0_10/bin/java thing it worked. I wonder why its not a recognized command via terminal without typing the exact location of the java program =/.. thanks for your help techieMoe, =) should have figured it'd be as simple as that. I find most of my problems with linux are really easy to fix, its just finding the command line solution =)
- 01-16-2007 #4What it sounds like is there's no link to your java executable in /usr/bin. When programs get installed in Linux usually a link is placed in the /usr/bin/, /usr/sbin, or /usr/local/bin directories. When you type something in the terminal the system always looks there first, and if it can't find it will look at any other directories listed in your PATH. You can set your PATH from the command line, but I honestly haven't done it in so long I forgot how.
Originally Posted by jasonenid Registered Linux user #270181
TechieMoe's Tech Rants


Reply With Quote
