How do you install default jdk in Linux using apt-get command?
Here is a tutorial to learn how to install default jdk using apt-get command.
Step 1: Open terminal with su access and enter the command as shown below:
apt-get install default jdk -y
Step 2: After completion, the install command exits and instructs the user to restart the running instances of default jdk if it is running already.
Result of the Command Execution shown below:
root@hiox:~ apt-get install default jdk -y
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
texlive common libproc processtable perl xscreensaver gl
libdevel symdump perl libgd text perl libnet daemon perl libsys cpuload perl
libdb je java pure ftpd common libnet ssleay perl libcrypt openssl rsa perl
rpm2cpio pure ftpd mysql libsilcclient 1.1 3 postgresql 8.4
libyaml tiny perl realpath libfilesys df perl telepathy gabble libdb4.7 java
libunshield0 libpurple bin libproc process perl libconvert tnef perl
libgd graph3d perl libio stringy perl libgtk vnc 1.0 0 libnet dbus perl
libreadonly perl libdmraid1.0.0.rc16 libclone perl libpam unix2 smbclient
libjtidy java libgd gd2 perl totem plugins libicu4j java libxml parser perl
obexd client libddccontrol0 libservlet2.4 java libsox fmt base
libtie ixhash perl rrdtool mysql server libossp uuid perl g++ 4.4 lmodern
python louis liblouis data libreadonly xs perl ddccontrol db
libcrypt ssleay perl libuuid perl unshield libsox fmt alsa libdbi perl
libpolkit gtk 1 0 ncftp libgupnp 1.0 3 libjson xs perl
libdevel stacktrace perl libmime tools perl screen libstring shellquote perl
liblog log4perl perl librpmio0 libjson perl librpm0 seahorse rpm common
librrd4 libdshconfig1 libipc sharelite perl libgdict 1.0 6 whois
python gtksourceview2 libdotconf1.0 libhtml template perl libjs prototype
telepathy salut libperl6 junction perl libfcgi perl libcommons compress java
php5 gd luatex libdvbpsi5 libdspam7 toshset libfile mmagic perl
libdatetime timezone perl php mail mime libfile slurp perl libid3 3.8.3c2a
libmail rfc822 address perl tcsh procmail libportaudio2 php xml serializer
libnet cidr perl libxcrypt1 libelf1 libforms1 libcryptui0 libgdata common
libgnome mag2 libgail gnome module sbox dtc libgd graph perl libnss mysql bg
php pear libclutter gtk 0.10 0 libjsch java libgnome2 gconf perl
python brlapi libsoap lite perl php5 curl libt1 5 libsilc 1.1 2
linux headers 2.6.32 74 libjs scriptaculous libparams validate perl
liblouis0 linux headers 2.6.32 74 generic libpam mysql libfile tail perl
libreadline5 mlmmj python telepathy libnet server perl libhdf4 0
linux headers generic vino postgresql common libdbd mysql perl
libdatetime perl liblog dispatch perl pax postfix mysql postgresql
libsys cpu perl libcommons el java libspeechd2 postgresql client 8.4
libcompress raw zlib perl libgail common libdatetime locale perl webalizer
libgsm1 rpm librpmbuild0 libtask weaken perl nautilus sendto sox
libfreezethaw perl libgdata6 libschroedinger 1.0 0 mysql client
libslf4j java libdc1394 22 libplrpc perl libregexp java xz utils
wwwconfig common libgupnp igd 1.0 2 php xml parser mhonarc libdbd pg perl
libjasper java libmail dkim perl libconvert uulib perl liboobs 1 4
quadrapassel postgresql client common libdb4.6 libdb4.7 libxml xpath perl
texlive doc base libpq5 libid3tag0 libio multiplex perl libzephyr4
libhamcrest java liblucene2 java php5 mysql libequinox osgi java
liblist moreutils perl libintl perl patch libgcj common libcommon sense perl
php5 cli php crypt cbc libsox1a system tools backends libnet libidn perl
libnice0 totem libconvert binhex perl libcommons digester java
libloudmouth1 0 totem mozilla libio socket ssl perl libjetty java p7zip full
libossp uuid16 python rdflib php mail mimedecode ucspi tcp librsync1
php5 common openbsd inetd libjline java mysql server 5.1 tex common
libclass singleton perl libnet1 totem common libmldbm perl python crypto
libxml twig perl libgssdp 1.0 2 libunix syslog perl
libcrypt openssl bignum perl mysql client 5.1 telepathy mission control 5
libnids1.21 libnetcdf4 libstdc++6 4.4 dev
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
default jdk
0 upgraded, 1 newly installed, 0 to remove and 49 not upgraded.
Need to get 0B/1064B of archives.
After this operation, 32.8kB of additional disk space will be used.
Selecting previously deselected package default jdk.
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 178969 files and directories currently installed.)
Unpacking default jdk (from .../default jdk_1.6 34_amd64.deb) ...
Setting up default jdk (1.6 34) ...
root@hiox:~