• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install OpenJDK 9 on Ubuntu

{{postValue.id}}

Install OpenJDK 9 on Ubuntu

Java is a high level programming language. It is a compiled programming language. But it doesn’ t compile Java code to machine language directly. It compiles to Java byte code using the Java compiler. Then a Java Virtual Machine or JVM is used to translate the Java byte code into machine language. As a computer can only understand machine language, it is the JVM that is responsible for running a Java program. JVM is platform dependent. That is, JVM on Windows is different than JVM on Linux or Mac OS. JVM on Linux is different than JVM on Mac OS or Windows and so on. But the Java byte code is platform independent. So Java can be compiled once and run everywhere. That is why it is so popular and billions of devices have Java installed.


Programmers use Java Development Kit or JDK to compile and run Java programs. JDK is a collection of tools required to develop, debug, package Java applications. It is really so simple to install OpenJDK 9 on Ubuntu and this tutorial covers the ground on the same process. 

 

Installing OpenJDK 9

Before you begin with the process, make sure you update your Ubuntu operating system by making use of the following command.

root@linuxhelp:~# apt-get update
Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease
.
.
Hit:6 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease    
Reading package lists... Done

 

 

And then, you can proceed with the installation of OpenJDK 9 by running the following command.

root@linuxhelp:~# apt-get install openjdk-9-jdk-headless
Reading package lists... Done
.
.
bingwallpaper
Reading package lists... Done

 

Once OpenJDK 9 is installed, you can verify it, and for that you can check the version of Java compiler provided by the OpenJDK 9 package. Run the following command for the same purpose.

root@linuxhelp:~# javac -version
javac 9-internal

 

Same way, you can also check Java Virtual Machine (JVM) provided by the OpenJDK 9 package with the help of the following command.

root@linuxhelp:~# java -version
openjdk version " 9-internal" 

 

Also, to check further, create a Hello.java Java source file through the following commands.

root@linuxhelp:/home/user/Documents# cd /home/user/Documents/codes/
root@linuxhelp:/home/user/Documents/codes# vim Hello.java 

 

 

 

After that, you need to compile Hello.java file.

root@linuxhelp:/home/user/Documents/codes# javac Hello.java 

 

Also, see the ‘ Hello.class’ Java byte code file.

root@linuxhelp:/home/user/Documents/codes# ls
Hello.class  Hello.java

 

And then run the Java byte code as follows.

root@linuxhelp:/home/user/Documents/codes# java Hello
hello from Linuxhelp

Everything seems to be fine. With this, the installation of OpenJDK 9 on Ubuntu comes to an end. 
 

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Is Oracle committed to OpenJDK?

A

Yes. Oracle remains committed to OpenJDK as the best open-source Java implementation and we will continue to improve OpenJDK and welcome external contributors.

Q

What is the difference between Java and Javascript?

A

Key differences between Java and JavaScript: Java is an OOP programming language while Java Script is an OOP scripting language.

Q

What is the difference between HTML and Java?

A

HTML is used to develop only Static pages. On the other hand, JAVA is a
programming language which is used to develop web applications.
It is a scripting language which is used to develop d

Q

Will Oracle change the OpenJDK licensing model?

A

No. The OpenJDK Community continues to thrive with contributions from Oracle, as well as other companies, researchers, and individuals, and the GPL-based licensing model is one large part of this success. Oracle has no plans to change it.

Q

Will Oracle make the Java SE 6 TCK available to the OpenJDK Community?

A

For implementations meeting the requirements of the OpenJDK TCK License Agreement, a process to obtain the TCK is documented on the OpenJDK web site in the Conformance Group at http://openjdk.java.net/groups/conformance/JckAccess/index.html.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.