xingbin
xingbin

Reputation: 28289

Diffrences between "apt-get install openjdk-8-jdk" and downloading *.tar.gz

I want to install openjdk on ubuntu. I found two ways to install it.

The first is typing "sudo apt-get install openjdk-8-jdk" on terminal.

The second is downloading the binary file such as *.tar.gz and then unpack the file and set environment variables JAVA_HOME&PATH.

So, is there any difference between this two methods? I mean, will it cause different results?

Thanks a lot.

Upvotes: 2

Views: 936

Answers (2)

Stefan
Stefan

Reputation: 12462

With the first approach, the installation is controlled by Debians Apt package manager and will receive updates, with the second one you will have to do that manually.

Upvotes: 2

PaulDennetiere
PaulDennetiere

Reputation: 179

It will probably not end with different result. On linux distributions you have what is called a packet manager : Yours (and on almost every ubuntu) is APT. So the main difference is that when you use apt, you can "trust more" what you are downloading, because hopefully, content in apt are check. However, because of this checking, apt isn't every time up-to-date, and it may induce some difference in version. However, in my opinion if you doesn't want to duplicate file or pollute your system, you may want to choose either one option and stay with it : if you use apt, use apt to update, if you download it manually keep updating it manually. I personally prefer to use apt when possible.

Upvotes: 1

Related Questions