Java is multi platform programming language.It uses JDK(includes jre) to create a class file from the source code and then the generated class file can be run on any computer by using Java Virtual Machine(JVM).So to write and execute java programs Java Development Kit(JDK) must be installed on the computer. Installing JRE /JDK on Ubuntu …