Skip to main content

Java -7 Installation in Ubuntu



JAVA-Oracle 7 in UBUNTU 


If you really need to use Oracle (ex Sun) Java instead of OpenJDK in Ubuntu, here's an easy way to do it: a PPA repository to install and keep your computer up to date with the latest Oracle Java 7 (Java JDK which includes JRE).



Oracle JDK7 itself is not hosted in the PPA because that's not allowed by the new Java license (which is also the reason why it has been removed from the official Ubuntu repositories); the package in the PPA automatically downloads Oracle Java JDK 7 from its official website and installs it on your Ubuntu / Linux Mint computer, just like the flashplugin-installer package does.

oracle java



Please note that this package is currently in alpha and is offered without any guarantees, so it may or may not work! Use it at your own risk! The package should support proxies just like the flashplugin-installer does, but it may fail if your ISP or router blocks some non-standard ports because Oracle uses quite a few redirects for the Java 7 binary download links. If the download fails because of blocked ports or because you're behind a firewall, use the manual Oracle Java 7 installation method (link in the beginning of the post).


Install Oracle Java 7 in Ubuntu PPA


This package provides Oracle Java JDK 7 (which includes Java JDK, JRE and the Java browser plugin). However, you can't only install Oracle JRE - the PPA only provides the full Oracle JDK7 package.

Important: Ubuntu 13.04 and 12.10 are no longer supported by Canonical: there will be no security updates and they don't allow uploading new packages to Launchpad PPAs!


To add our PPA and install the latest Oracle Java 7 in Ubuntu (supports Ubuntu 13.10, 13.04, 12.10, 12.04 and 10.04) or Linux Mint, use the commands below:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

For Checking type
 java -version
 javac -version

If for some reason, the Java version in use is not 1.7.0, you can try to run the following command:
sudo update-java-alternatives -s java-7-oracle

Update: the installer now requires you accept the Oracle license before the installation begins. This is only required once. If for some reason you need the installation to be automated, you can run the following command to automatically accept the Oracle license:

echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

Setting Java environment variables


To automatically set up the Java 7 environment variables, you can install the following package:

sudo apt-get install oracle-java7-set-default

Removing Oracle Java 7

If you don't want to use Oracle Java (JDK) 7 anymore on your Ubuntu / Linux Mint computer and want to go back to OpenJDK, all you have to do is remove the Oracle JDK7 Installer and the previous Java (OpenJDK, etc.) version will be used:

sudo apt-get remove oracle-java7-installer

Comments

Popular posts from this blog

StandAlone Apache Storm Installation in Ubuntu 14.04 LTS

Deploying Apache Storm  1) If Java 7 is not present, please install it. 2) Zookeeper Installation Download zookeeper-3.4.6 from Apache site       $ tar -xvf zookeeper-3.4.6.tar.gz       $ cd zookeeper-3.4.6/       $ cp conf/zoo_sample.cfg conf/zoo.cfg       $ bin/zkServer.sh start 3) Storm Cluster Installation Download the storm tarball from official Apache Mirror.  Untar it.       $ tar xzvf apache-storm-0.9.2-incubating.tar.gz Move to new directory.       $ sudo cp -R apache-storm-0.9.2-incubating /usr/lib/ Go to /usr/lib/apache-storm-0.9.2-incubating/ and configure storm.yaml present in conf folder, add the followuing line, this folder must have write permissions too. storm.zookeeper.servers:     - "localhost" storm.zookeeper.port: 2181 nimbus.host: "localhost" storm.local.dir: "/var/stormtmp"    ...

Replace GRUB With BURG to Beautify Boot Menu, Install in Ubuntu via PPA

Burg is boot loader forked of GRUB loader. It uses a new object format which allows it to be built in a wider range of OS, including Linux/Windows/OSX/Solaris/FreeBSD, etc. It also has a highly configurable menu system which works in both text and graphic mode. Additional features like stream support and multiple input/output device are also planned for BURG. BURG features superior theming and has a highly configurable menu system which works at boot time in both text and graphical mode. Since BURG is derived from GRUB, its configuration is similar in most respects. The main configuration file is /boot/burg/burg.cfg  and is usually generated automatically. You can create one by yourself or use  grub-customizer  to modify BRUG entries and other stuff. You can even design theme for BURG checkout this  link  for more details about BURG. All below images are from Noobslab Available for Ubuntu 14.04/14.10/12.04/Linux Mint 17/13 To install Burg with...

How to Re-enable Hibernation in Ubuntu 14.04

1) Open the terminal (Ctrl+alt+T) 2) type: sudo gedit /var/lib/polkit-1/localauthority/10-vend ­or.d/com.ubuntu.desktop.pkla 3) Enter your password when requested. 4) Search for the section  [Disable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=no [Disable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate ResultActive=no 5) Change both value of "ResultActive=no" to "ResultActive=yes" 6) Save and close the editor. 7) Log out and then log back in, or reboot the system. You are now good to go!