Michael Durrant
Michael Durrant

Reputation: 96544

Installing java - should I use the .rpm file or the .tar.gz?

I am looking to install java on Linux Ubuntu 64-bit. Should I use the .tar files or the .gz files. Download speed is not an issue. I'm not interested in tons of details I just would like to pick one. I will be doing application development, though not in java itself which I don't know/use. It is needed for other products that I run like rubyMine for developing ruby applications.

Upvotes: 11

Views: 29121

Answers (7)

Akash Kandpal
Akash Kandpal

Reputation: 3386

The rpm id "Redhat Packet Manager" type of file, and is the most easiest to install if you use a compatible system like RedHat or Madrake. You just have to type

rpm -iv PACKAGE_NAME.rpm

and it will be installed.

A tar file is an archive file which can be extracted by

tar -xvf NAME.tar

and it will be extracted in the current directory.

Now, a tar.gz file is just a tar file that has additionally been gzipped. This is like WinZip, but it is a format of compression in the Unix systems. First, you have to do

gunzip NAME.tar.gz

and you get NAME.tar which you will then extract.

The src.tar is a file containing the source code of the application, and if you need the source code for sepearate compilation or modification, you should go for it.

The easiest to use is an rpm file, then a tgz (gzipped tar file), and finally the src file.

Upvotes: 0

Artem
Artem

Reputation: 4397

Unfortunately, Oracle changed the licence for JDK. You can get only OpenJDK from repository(using apt-get install).

If you want to use Oracle JDK, you should download and install it manually.

Upvotes: 3

Ulf Jaehrig
Ulf Jaehrig

Reputation: 749

Ubuntu uses deb packages. You can use rpm, but I would recommend using the standard repository (e.g. apt-get install openjdk-6-jre). Or you can use the software center in ubuntu.

When using the repository, you will receive updates etc. When using a .tgz or .rpm, you have to manage the updates yourself. Also dependencies will not be resolved automatically.

Upvotes: 0

Aman sharma
Aman sharma

Reputation: 31

You can use Ubuntu software centre :).

Upvotes: 3

jefflunt
jefflunt

Reputation: 33954

If both install and work for you, it doesn't matter which one you choose. both formats accomplish the same thing, and result in the same software being installed.

Another option in Ubuntu is using apt-get install, which is very simple, and automates the process.

Upvotes: 8

Tudor
Tudor

Reputation: 62459

I would recommend using apt-get install, it's cleaner.

Upvotes: 4

blueintegral
blueintegral

Reputation: 1271

The .rpm will probably be quicker by a few seconds. It really doesn't matter at all though. A .tar.gz file is just a g-zipped tar file (sometimes called a tarball). The .rpm is a format that Ubuntu knows how to automatically install.

Upvotes: 0

Related Questions