This is more of a general question about OpenJDK and packages being removed.
I am removing libatk-wrapper-java. However when I use apt-get to remove it, it says openjdk-7-jre will also be removed. My question is, I am still able to use the java command successfully even after openjdk-7-jre was removed, how is this possible?
You can use this to find out where the Java command that’s being used is located:
Then, use
ls -lto find out if that’s a symlink, and if so, where it points. (There’s a good chance it will point to something in/etc/alternatives, at least that’s what it does on my system.)Keep using
ls -lto follow the links until you find the real binary that is being run.Then, use this to find out what package owns the binary:
On my machine, this process looks like this:
This tells me that the package
openjdk-6-jre-headlessis installed, and that’s what owns the Java binary that is run when I typejavaat the command prompt. (There still might be one or more other JVM’s on your system, though. This is only telling me which one will be the default.)This might not be the fastest way to answer your question, but it will hopefully help you understand your system setup a little better.