Skip to main content

How to install Oracle JDK on Ubuntu from repository

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.


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


And to uninstall:
sudo apt-get remove oracle-jdk7-installer



And to verify your installation:
java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)


And to verify the web browser installation:
http://java.com/en/download/installed.jsp
Verified Java Version
Congratulations!
You have the recommended Java installed (1.7.0_51).


And to update:
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

To Install and Set in environment variable:
To automatically set up the Java 7 environment variables, you can install the following package:

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

Comments

Popular posts from this blog

How to install play framework

Prerequisites To run the Play framework, you need JDK 6 or later . If you are using MacOS, Java is built-in. If you are using Linux, make sure to use either the Sun JDK or OpenJDK (and not gcj, which is the default Java command on many Linux distros). If you are using Windows, just download and install the latest JDK package. Note, Java 7 pre update 9 on MacOS has a bug that causes problems with futures and iteratees, including making large file uploads hang. If using Java 7 on MacOS, make sure you are using the latest version. Be sure to have the java and javac commands in the current path (you can check this by typing java -version and javac -version at the shell prompt). Download the binary package Download the latest Play standalone distribution and extract the archive to a location where you have both read and write access. (Running play writes some files to directories within the archive, so don’t install to /opt , /usr/local or anywhere else you’d need s...

Java HotSpot VM Settings

The following JVM parameters are recommended: -Djava.awt.headless=true  -Dfile.encoding=UTF-8  -server  -Xms512m  -Xmx1024m  -XX:NewSize=256m  -XX:MaxNewSize=256m  -XX:PermSize=256m  -XX:MaxPermSize=256m  -XX:+DisableExplicitGC -Djava.awt.headless=true Headless mode is a system configuration in which the display device, keyboard, or mouse is lacking. Sounds unexpected, but actually you can perform different operations in this mode, even with graphic data. -server The JDK includes two flavors of the VM -- a client-side offering, and a VM tuned for server applications. These two solutions share the Java HotSpot runtime environment code base, but use different compilers that are suited to the distinctly unique performance characteristics of clients and servers. These differences include the compilation inlining policy and heap defaults. Although the Server and the Client VMs are similar, the Serv...

Play Framework: Setting up your preferred IDE

Working with Play is easy. You don’t even need a sophisticated IDE, because Play compiles and refreshes the modifications you make to your source files automatically, so you can easily work using a simple text editor. However, using a modern Java or Scala IDE provides cool productivity features like auto-completion, on-the-fly compilation, assisted refactoring and debugging. Eclipse Generate configuration Play provides a command to simplify Eclipse configuration. To transform a Play application into a working Eclipse project, use the eclipse command: without the source jars: [ My first application ] $ eclipse   if you want to grab the available source jars (this will take longer and it’s possible a few sources might be missing): [ My first application ] $ eclipse with - source = true     IntelliJ Generate configuration Play provides a command to simplify Intellij IDEA configuration. To transform a Play application into a working IDEA m...