LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-18-2006, 09:00 PM   #1
computerages
LQ Newbie
 
Registered: Aug 2006
Location: /home/zixan/Desktop
Distribution: 2.6.17-1.2174_FC5
Posts: 6

Rep: Reputation: 0
Question running .jar files


hi, i've download jave-based installer fro jedit from its website... but now the problem is ".jar" file opens up in Archive Manager program when I click on it...instead of running the auto-installer...
 
Old 08-18-2006, 09:04 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
I think java -jar <filename> will work.
 
1 members found this post helpful.
Old 08-18-2006, 09:08 PM   #3
computerages
LQ Newbie
 
Registered: Aug 2006
Location: /home/zixan/Desktop
Distribution: 2.6.17-1.2174_FC5
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tangle
I think java -jar <filename> will work.
hi, thx for the super quick response..

that's what i get:
Code:
[root@localhost ~]# java -jar jedit42install.jar
Failed to load Main-Class manifest attribute from jedit42install.jar
[root@localhost ~]#
 
Old 08-19-2006, 12:44 AM   #4
timothyb89
Member
 
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118

Rep: Reputation: 15
Update JRE...?
 
Old 08-19-2006, 01:30 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
That looks like it's not a valid JAR file to me. You could unzip it and run the class files directly, perhaps.
 
Old 08-19-2006, 02:29 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I would think of a broken/uncompatible jdk/jre.

What reports: "java -version" ?
 
Old 08-19-2006, 02:47 PM   #7
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Quote:
Failed to load Main-Class manifest attribute from jedit42install.jar
Open the file with some archive manager. Check if a file /META-INF/MANIFEST.MF exists within that. Check whether this file contains the line "Main-Class: folder1.folder2.file". "folder1.folder2.file", of course, is just a placeholder of mine. Check whether the file /folder1/folder2/file exists in the archive.

If you've did that, and just nodded, "OK, exists", jedit42install.jar should be valid (which is likely). In this case, we'ld need to find out more about your Java version (as jlliagre suggested).
 
Old 08-19-2006, 03:45 PM   #8
computerages
LQ Newbie
 
Registered: Aug 2006
Location: /home/zixan/Desktop
Distribution: 2.6.17-1.2174_FC5
Posts: 6

Original Poster
Rep: Reputation: 0
thx every1 for the replies

java -version:
Code:
[zixan@localhost ~]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.1 20060525 (Red Hat 4.1.1-1)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[zixan@localhost ~]$
I think there's a problem whith the gnu java installed on my system, as the file exists suggested by robbbert. I also installed java by sun (jre) using this tutorial but I think my system is not configuring it as the default java plugin..
 
Old 08-19-2006, 04:09 PM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Use the full path to where you have installed Sun's JRE, eg.
Code:
/opt/jre1.5.0_07/bin/java -jar jedit42install.jar
By the way, this is unrelated to the browser java plugin.
 
Old 08-19-2006, 05:51 PM   #10
computerages
LQ Newbie
 
Registered: Aug 2006
Location: /home/zixan/Desktop
Distribution: 2.6.17-1.2174_FC5
Posts: 6

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by jlliagre
Use the full path to where you have installed Sun's JRE, eg.
Code:
/opt/jre1.5.0_07/bin/java -jar jedit42install.jar
By the way, this is unrelated to the browser java plugin.
thanks jlliagre, finally got it running...
 
Old 08-19-2006, 06:01 PM   #11
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
You could link /opt/jre1.5.0_07/bin/java to /usr/bin then you wouldn't have to type the full path. Or just include the /opt/jre1.5.0_07/bin/ in your profile path.
 
Old 08-19-2006, 07:31 PM   #12
computerages
LQ Newbie
 
Registered: Aug 2006
Location: /home/zixan/Desktop
Distribution: 2.6.17-1.2174_FC5
Posts: 6

Original Poster
Rep: Reputation: 0
tangle, do you know how can I link through the terminal, as I don't have root access in GUI? Or, is there a way to have root access with normal login in GUI?
 
Old 08-19-2006, 07:53 PM   #13
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Rep: Reputation: 30
Quote:
Originally Posted by computerages
tangle, do you know how can I link through the terminal, as I don't have root access in GUI? Or, is there a way to have root access with normal login in GUI?
su
ln -sv
 
Old 08-19-2006, 07:59 PM   #14
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
ln -s <file your want to link> <file you want to link to>

ln -s /opt/jre1.5.0_07/bin/java /usr/bin/java
 
  


Reply

Tags
apps, jar, running



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble with JRE 1.5 and running a .jar toaster.waffle Linux - Software 4 06-21-2006 11:33 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM
running a ..jar file under Mandrake 10.0 official Jamel75 Linux - Software 5 09-07-2004 12:48 PM
Jar files krazibon3 Linux - Newbie 3 08-05-2004 09:42 PM
Installing Java running jar files jariep Red Hat 1 04-12-2004 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration