LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   THpw do I install from a tar or Jar file?? (https://www.linuxquestions.org/questions/linux-newbie-8/thpw-do-i-install-from-a-tar-or-jar-file-721148/)

mrwoggle 04-23-2009 08:32 AM

THpw do I install from a tar or Jar file??
 
Hello all.I am a bit of a Linux newbie,and am determined to get my head around it,but keep hitting problems..Todays problem is...

I cant seem to work out how to install software from Tar or Jar files..(Its one programme specifically-Ultramixer,DJ software)

I'm using Mandriva 2009 Gnome...

Any simply put instructions would be massively appreciated!!!

Cheers

AW

jdkaye 04-23-2009 08:44 AM

Hi MW,
The installation of software from tarballs (tar.gz or tar.bz2 files) varies according to whether you are compiling source code or installing binaries packaged in tarballs. In any event the first step is to unpack the tarball. You do this from the command line by executing:
Code:

tar zxvf [name of tar.gz file]
Assuming you have a java runtime environment (jre) already installed, go to the folder containing the .jar file and execute this command:
Code:

java -jar [name of .jar file]
cheers,
jdk

Spudley 04-23-2009 09:02 AM

The ideal way of installing software within Mandrivia is to find a RPM file for it. Installing via RPM will set up everything required within your system, ensure that any other software it relies on is in place, and also make it easier to update or remove the software later on.

However, some software simply doesn't have an RPM file, so you have to use whatever they provide. In this case, you mention TAR and JAR files.

"TAR" is an archive format that basically involves joining all the files together into a single bundle that can then be unbundled by you on your system. It is often combined with GZIP or BZIP to provide a TGZ file or similar, which you can think of as being quite similar to ZIP.

Once you've extracted the file, the contents of a TAR file can be anything, so installing the software could be rabge from really easy to virtually impossible. If you're lucky, there'll be an instructions file (probably README or similar) to tell you what to do, but it will be unique from case to case, so I can't help much there.


A JAR file is totally different -- JAR files contain programs written in the Java programming language. Again, there will probably be specific instructions, but the basic method of installing JAR files is standard -- use the command line to do the following:
Code:

java -jar {filename.jar}
(this assumes you have Java already installed on your system)

That much will install the program for you, but again once that's done, any further instructions will vary from program to program. It probably won't appear in your system menu, for example, so you'll need to set that up manually if you want it there.

mrwoggle 04-23-2009 09:41 AM

Hello again..I tried this and got an error repoer which I dont yet understand!I have copied and pasted it below..Can someone please dcipher it for me???

Exception in thread "main" java.lang.NoClassDefFoundError: jar
Caused by: java.lang.ClassNotFoundException: jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: jar. Program will exit.
[mrwoggle@localhost ~]$

mrwoggle 04-23-2009 09:43 AM

Having read it again,iis it a problem with Java?I installed through software management and just checked online,it said I needed to uodate Java,but it downloaded a rpm.bin file which I cant open!!

This starting out in linux sure aint easy!!!!

Cheers again

AW


All times are GMT -5. The time now is 02:05 PM.