How To Install gcj-jdk on Debian 9

In this tutorial we learn how to install gcj-jdk on Debian 9. gcj-jdk is gcj and Classpath development tools for Java(TM)

Introduction

In this tutorial we learn how to install gcj-jdk on Debian 9.

What is gcj-jdk

gcj-jdk is:

GCJ is a front end to the GCC compiler which can natively compile both Java(tm) source and bytecode files. The compiler can also generate class files. Other java development tools from Classpath are included in this package.

The package contains as well a collection of wrapper scripts and symlinks. It is meant to provide a Java-SDK-like interface to the GCJ tool set.

There are three methods to install gcj-jdk on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install gcj-jdk Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install gcj-jdk using apt-get by running the following command:

sudo apt-get -y install gcj-jdk

Install gcj-jdk Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install gcj-jdk using apt by running the following command:

sudo apt -y install gcj-jdk

Install gcj-jdk Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install gcj-jdk using aptitude by running the following command:

sudo aptitude -y install gcj-jdk

How To Uninstall gcj-jdk on Debian 9

To uninstall only the gcj-jdk package we can use the following command:

sudo apt-get remove gcj-jdk

Uninstall gcj-jdk And Its Dependencies

To uninstall gcj-jdk and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove gcj-jdk

Remove gcj-jdk Configurations and Data

To remove gcj-jdk configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge gcj-jdk

Remove gcj-jdk configuration, data, and all of its dependencies

We can use the following command to remove gcj-jdk configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge gcj-jdk

Dependencies

gcj-jdk have the following dependencies:

References

Summary

In this tutorial we learn how to install gcj-jdk package on Debian 9 using different package management tools: apt, apt-get and aptitude.