How to install JDK and JRE on Godaddy Server?
Last Updated : 07 Nov, 2022
GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. It’s a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure.Java is a high-level, class-based, object-oriented programming language created by James Gosling in 1995. The JDK (Java Development Kit) is a development environment for building applications in the Java programming language. To know more please visit Java Tutorial. In this article, we will discuss how to install the latest version of JDK and JRE on GoDaddy VPS (Ubuntu).
Installing JRE and JDK on Godaddy Server
Step 1: Open your terminal and ssh into the Godaddy server.
$ ssh [username]@[ip]
Step 2: Update and upgrade the server by running.
$ sudo apt update -y $ sudo apt upgrade -y
Step 3: Install the default Java Runtime Environment (JRE) from APT software repositories.
$ sudo apt install default-jre
Step 4: Verify the installation by performing a version check
$ java -version
Step 5: Now install Java Development Kit (JDK) to use JRE to compile and run s Java-based programs and software.
$ sudo apt install default-jdk
Step 6: Verify the installation by performing a version check
$ javac -version
Compiling and executing Java Program
Step 1: Create a basic Java program that outputs 'Geeks For Geeks'.
$ nano GFG.java
GFG.java:
Java import java.io.*; class GFG { public static void main (String[] args) { System.out.println("Geeks For Geeks"); } }
Step 2: Use the java compiler to compile the GFG program.
$ javac GFG.java
Step 3: Finally, use JVM to execute the newly created class file.
$ java GFG
Similar Reads
How to install Python3 and PIP on Godaddy Server? GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. Itâs a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure. Python is an open-source, cross-platform, high-level,
2 min read
How to Install MongoDB on GoDaddy Server? MongoDB is a free, open-source, cross-platform NoSQL database. MongoDB is a schema-less database system and hence it's very easy to add new fields to it. It is a distributed system hence data recovery is instant and more reliable. Its features include highly flexible, performance, scalability, index
2 min read
How to install PHP on Godaddy server? GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. Itâs a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure. PHP or Hypertext Preprocessor is an open-source and g
2 min read
How to Install GoLang on GoDaddy Server? GoDaddy Server is a cloud-based hosting platform that consists of virtual and dedicated servers. The premium service includes weekly backups, 99% uptime, 24x7 Customer Support, a free encrypted SSL certificate, unlimited bandwidth, and SSD storage. For regular users, the latest generation is VPS Gen
2 min read
How to Install and Manage Node using NVM on Godaddy Server ? Managing multiple versions of Node.js on your server can be quite a task, especially if you're developing or maintaining applications that require different versions. Node Version Manager (NVM) simplifies this process by allowing you to install and switch between different versions of Node.js easily
3 min read