Why we should use Binary Installation without using apt in Ubuntu?
The difference is that apt installs generic binaries and manages their versions.
When compiling a source package you are entirely on your own because apt cannot manage the package.
However, compiling a source package and installing it yourself is useful if you need features that can be had only by compiling the package yourself.
Sometimes developers will provide features that can only be used in software if a certain compiler switch is used. And sometimes specific processors can perform better if certain compile flags are used.
However, in most cases the features that can be enabled are for debugging purposes and will never be needed even by hard core users. And the binary version that apt is configured to use is already optimized for your processor.
Possible situations where you would need to compile the source yourself would be:
Download the x64
Create a directory and move the file there
First set the
And you can install multiple Java versions in your device and set up aliases to quickly switch between the versions. Please refer to my article on Swap JDK using aliases in Ubuntu.
Hope you learned something from this article. Thank you.
When compiling a source package you are entirely on your own because apt cannot manage the package.
However, compiling a source package and installing it yourself is useful if you need features that can be had only by compiling the package yourself.
Sometimes developers will provide features that can only be used in software if a certain compiler switch is used. And sometimes specific processors can perform better if certain compile flags are used.
However, in most cases the features that can be enabled are for debugging purposes and will never be needed even by hard core users. And the binary version that apt is configured to use is already optimized for your processor.
Possible situations where you would need to compile the source yourself would be:
- There's a version of the software available that has features or fixes you need but the package hasn't been updated in your repository yet.
- You're compiling the software to use on a computer with a different architecture.
How to install JDK using Binary distribution in Ubuntu?
Download the x64
tar.gz
on the Oracle Downloads page.Create a directory and move the file there
sudo mkdir ~/jdk
cd ~/jdk
sudo mv ~/Downloads/jdk-8u45-linux-x64.tar.gz .
And unpack itsudo tar zxvf jdk-8u45-linux-x64.tar.gz
You have just extracted the binary file but you didn't set JAVA_HOME
.First set the
JAVA_HOME
in your profile i.e. in ~/.bashrc
file.export JAVA_HOME=~/jdk/java/jdk1.8.0_45
export PATH=$PATH:$JAVA_HOME/bin
However, compiling a source package and installing it yourself is
useful if you need features that can be had only by compiling the
package yourself.
You can check the java version
to double check by typing the command java -version.
And you can install multiple Java versions in your device and set up aliases to quickly switch between the versions. Please refer to my article on Swap JDK using aliases in Ubuntu.
Hope you learned something from this article. Thank you.
Comments
Post a Comment