JavaBeat

  • Home
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Privacy

Install Java 8 in Ubuntu

March 30, 2014 by Krishna Srinivasan Leave a Comment

This post explains how to install Java 8 in your Ubuntu OS. If you are running Windows OS, it is straight forward to download the EXE file and install it. Even the same way you can do it for Ubuntu by loading the package. However, there is very simple and easy solution in Ubuntu is to download from the repository which is advantage since you would get the notification of any update to the Java version.

At present Java 8 is not by default included in the repository. We have to use the Personal Package Archive (PPA), is a collection of software not included in Ubuntu by default. Here I provide you the details on how to install Java 8 quickly. You just follow the below steps to install it.

  1. Open Terminal and ENter “sudo add-apt-repository ppa:webupd8team/java”
  2. Enter the command “sudo apt-get update”
  3. Enter the command “sudo apt-get install oracle-java8-installer”. If you have already installed the Java 6 or Java 7 and want to replace the Java 8 as the default, then use this command “sudo apt-get install oracle-java8-set-default”. This will remove the old versions and install the Java 8 and set the environment variables for Java 8.
  4. After install if you want to switch to Java 8, enter this command “sudo update-java-alternatives -s java-8-oracle”. In the same way if you want to switch back to Java 7 use this command “sudo update-java-alternatives -s java-7-oracle”.

[code]
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
[/code]

Once you run the above steps, installation process will start. It would take several minutes to complete the installation.

Ubuntu Java 8 Install

I hope this post would be more useful for those who are working on the Ubuntu environment.

Filed Under: Java Tagged With: Java 8, Ubuntu

How To Install Maven On Ubuntu?

October 1, 2013 by Krishna Srinivasan Leave a Comment

Apache Maven is project management tool which is following the concept of a project object model (POM). Maven can manage project’s build and documentation from a central place. Maven 1 actually was started as a sub project of Apache Turbine in 2002. It was released in July 2004 as v1.0. Maven 2 was released in Oct 2005. It was a complete rewrite of the previous project. It was not backward compatible. Maven 3 was released in October 2010 (Read : What is Apache Maven?).

This tutorial explains the steps to install the maven on Ubuntu 12.0.

1. Get Maven Package

Open the terminal and type the command $ apt-cache search maven. The command prompt will display the available packages which is matching the maven word. In the list, you also can see maven – Java software project management and comprehension tool. This package will always have the latest package.

Search Maven in Ubuntu

2. Install The Package

Run the command $ sudo apt-get install maven through the same above terminal. It will ask for the root password and some confirmation messages. Just follow and answer the questions till the installation is completed. Since the installation is done by downloading the entire package, it takes several minutes to download the entire mavan files. Note that you should have internet connection for installing the maven through the command prompt. It is the easiest way to install the package. Wait till the installation is completed.

3. Test The Maven Installation in Ubuntu

Run the command mvn -version to check if the maven is installed properly. You will see the below description on the command prompt.

[java]

krishna@krishna-desktop:~$ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_27, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-i386/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-51-generic", arch: "i386", family: "unix"

[/java]

Maven is installed successfully. I found the installation on Ubuntu is much simpler than installing on Windows operating system. I would continue writing few more tips on using the various tools on Ubuntu OS. It is great experience on using Ubuntu for developing the Java applications. I would recommend you to try once, then you will never look back.

  • Apache Maven for Beginners
  • How to write a Custom Plugin for Maven?

If you are facing any issues, please write it in the comments section.

Filed Under: Apache Maven Tagged With: Maven, Ubuntu

How to Install Tomcat in Ubuntu?

August 3, 2013 by Krishna Srinivasan Leave a Comment

Linux is good environment for running the Java applications. Most of the developers not trying the Linux environment only because of the complicated installation procedures needed for at the time of beginning. Once if you are familiar with the installation then it is cake walk for developing the Java applications. But, I can not say that it is always better than Windows environment, it depends on the developers knowledge level to adopt the Linux environment. Generally advanced technical users would like to work on these environment.

This article provides very basic information on installing Tomcat server in Ubuntu environment. I have tried this example in Ubuntu 12.0 environment. If you face any problems during the installation, please write it in the comments section. If you are interested in receiving the future articles, please subscribe here. follow us on @twitter and @facebook

ubuntu

Tomcat Installation in Ubuntu

This steps explains how to manually install the tomcat in your Ubuntu. As a first step download Tomcat from http://tomcat.apache.org/. Unzip the tar file using the command

[java]
tar -zxvf apache-tomcat-6.0.16.tar.gz
[/java]

apache-1
apache-2Once unzip is completed, it is very simple to run the tomcat server. There is no other configurations are required.
[java]
apache-tomcat-6.0.16/bin$ sh startup.sh
apache-tomcat-6.0.16/bin$ sh shutdown.sh
[/java]

apache-3
I have uploaded the screen-shots of each stem in detail, that would help you. If you have better suggestion for installing it, please post it in the comments section.

If you are interested in receiving the future articles, please subscribe here. follow us on @twitter and @facebook

Filed Under: Servers Tagged With: Tomcat, Ubuntu

Follow Us

  • Facebook
  • Pinterest

As a participant in the Amazon Services LLC Associates Program, this site may earn from qualifying purchases. We may also earn commissions on purchases from other retail websites.

JavaBeat

FEATURED TUTORIALS

Answered: Using Java to Convert Int to String

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Copyright © by JavaBeat · All rights reserved