Re: /usr/bin/rmic -- why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joel wrote:
(Apologies for the cross-post.)

I asked


What are jar, rmiregistry, and who knows what else doing in /usr/bin ?

I know that everyone just shoves /usr/local/java/sdk/bin (or whatever)
in at the top of $PATH, but I can think of several very good reasons
that is not a good idea. So if there's a good reason, I'd like some
feedback before I post a bug on this.


Rahul explained


they are java related packages. they might have been installed by
default. if you dont want remove them. this is not a bug


and James added


They're symlinks into the Red Hat alternatives scheme.
man 8 alternatives says:

      [...]

So they allow you to have a number of Java virtual machines, and easily
swap from one to another.


and then Matthew clarified


The Jpackage-style Java installs (including the gcj one included in FC3)
use the alternatives(8) system to manage simultaneous installation of multiple versions.


Okay, I'll dig into the alternatives man page, although I really didn't
want to know about that. Don't plan on using it.

But I did not install any java at all when I installed Fedora. There was
no javac in the same place. Moreover, on this FC2 install, these are not
symbolic links. If they're multiply linked, the links are hard. They do
not show up in /etc/alternatives, nor in anything in /var/lib/alternatives.

Why are jar and rmic in there at all? Are they being used by the system,
and if I remove them will something break? How do I find out what else
to remove?

rpm is your friend! You can use it to figure out what package they're in:

matt@tomis ~ $ rpm -q -f /usr/bin/jar
libgcj-3.3.3-7

and then test removing it to see what other packages depend on it:

matt@tomis /etc/alternatives $ /bin/su
Password:
root@tomis /etc/alternatives $ rpm -e --test libgcj
error: Failed dependencies:
        libgcj.so.4 is needed by (installed) gettext-0.14.1-2.1
        libgcj = 3.3.3 is needed by (installed) libgcj-devel-3.3.3-7
        libgcj >= 3.3.3 is needed by (installed) gcc-java-3.3.3-7

In this case, if I didn't want GNU's java compiler, I could remove gcc-java and libgcj-devel, but there might be some other programs that use gettext:

root@tomis /etc/alternatives $ rpm -e --test gettext
error: Failed dependencies:
        gettext is needed by (installed) mutt-1.4.1-6

You'll need to remove the --test option to actually remove the packages, if you want to do that.

root@tomis /etc/alternatives $ man rpm

--
      Matt

      Matthew Zimmerman
      Interdisciplinary Biophysics, University of Virginia
      http://www.people.virginia.edu/~mdz4c/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux