I received the following results of sudo apt-get install gcj in Ubuntu 16.04.

$ sudo apt-get install gcj
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package gcj is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gcj' has no installation candidate

How to install gcj on Ubuntu 16.04?


1 Answer 1


gcj is provided by gcj-jdk, gcj-4.8-jdk, gcj-4.9-jdk, gcj-5-jdk and gcc-snapshot in Ubuntu 16.04. Before you try to install any of these packages, run the following command to show what version(s) of gcc you have installed on your system.

apt-cache policy gcc gcc-4.8 gcc-4.9 gcc-5  

If you have only gcc-4.8 installed on your system, it's obvious that you don't need to install gcj-4.9-jdk or gcj-5-jdk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .