Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

112358wise/install-java

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Oracle Java installation script for Linux

"install-java.sh" is an installation script for setting up Oracle Java Development Kit on Linux.

I'm mainly using Ubuntu and therefore this script is tested only on Ubuntu 14.04 64-bit version

Prerequisites

This script will not download Java distribution. You need to download JDK from Oracle.

Only requirement is to have all required distributions in a single directory.

For example, if you want to install Java 7, following files must be downloaded.

  • jdk-7u80-linux-x64.tar.gz
  • jdk-7u80-linux-x64-demos.tar.gz
  • UnlimitedJCEPolicyJDK7.zip

Similarly for Java 8, following are the files required

  • jdk-8u45-linux-x64.tar.gz
  • jdk-8u45-linux-x64-demos.tar.gz
  • jce_policy-8.zip

Installation

The script needs to be run as root.

You need to provide the JDK distribution file (tar.gz) and the Java Installation Directory. The default value for Java installation directory is "/usr/lib/jvm"

Usage: 
install-java.sh -f <java_dist> [-p] <java_dir>

-f: The jdk tar.gz file
-p: Java installation directory

Example: Install Oracle JDK 7

sudo ./install-java.sh -f ~/Software/jdk-7u72-linux-x64.tar.gz

Example: Install Oracle JDK 8

sudo ./install-java.sh -f ~/Software/jdk-8u25-linux-x64.tar.gz

License

Copyright (C) 2014-2015 M. Isuru Tharanga Chrishantha Perera

Licensed under the Apache License, Version 2.0

About

Installation script for setting up Java on Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.