How can I install gcj? Do I need to recompile gcc?

I have a system with gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3) and another with gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)

Running gcj on both systems gives "command not found" message.


One of my system responded to yum command (It is a CentOS disto) but gives:

root@m454:~# yum install gcj
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosf3.centos.org
 * updates: centosu.centos.org
 * addons: centosu.centos.org
 * extras: centosu.centos.org
Excluding Packages in global exclude list
Setting up Install Process
Parsing package install arguments
No package gcj available.
Nothing to do
  • welcome to SuperUser! i've moved your updated info from the answer into the body of the question. if you have further updates, use the "edit" link to add directly to the question text. – quack quixote Dec 8 '09 at 7:39
  • Does anyone have an up to date answer for this? – Magpie Dec 6 '14 at 11:57

You probably need to install the gcj package. If you're using Red Hat, fire up Terminal and something like this should work:

yum update
yum install gcj (or java-gcj-compat)

You can use:

yum install gcc-java
  • This works perfectly on CentOS (5.whatever) – user59022 Dec 13 '10 at 16:20

Under OpenSUSE, start /sbin/yast2, click on the "Software management", enter "gcj" in the search box, ans post-install all gcj packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.