How to remove openjdk
Jim Byrnes
jf_byrnes at comcast.net
Sun Dec 16 23:02:07 UTC 2012
On 12/15/2012 09:56 PM, Ric Moore wrote:
> On 12/14/2012 09:46 PM, Jim Byrnes wrote:
>> On 12/14/2012 01:52 PM, Ric Moore wrote:
>>> On 12/14/2012 10:43 AM, Jim Byrnes wrote:
>>>> On 12/14/2012 02:41 AM, Ric Moore wrote:
>>>>> On 12/13/2012 07:54 PM, Jim Byrnes wrote:
>>>>>> I goofed. I installed jEdit on my new install of 12.04 before I
>>>>>> installed Oracle's java. jEdit pulled in openjdk which I don't want.
>>>>>>
>>>>>> What is the proper way to completely remove jEdit and openjdk so I
>>>>>> can
>>>>>> install Oracle's java and then jEdit just like I had never messed
>>>>>> up in
>>>>>> the first place?
>>>>> I use this ... works a charm.
>>>>> http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Enjoy, Ric
>>>>>
>>>>>
>>>>
>>>> Thanks, Jim
>>> It also corrects the alternative links, and adds some you may never
>>> heard of. It's pretty thorough. But, I install alternatives-gtk to check
>>> each and every link. Amazing just how many links there are in the
>>> alternative scheme. You'll enjoy the trip. Ric
>>>
>>
>> Maybe if I knew what the trip was about. I'll admit my ignorance here,
>> what are the "alternatives" you are referencing?
>
>
> Ah... prepared to become enlightened! Within the /usr/lib/jvm scheme of
> things related to java, there are a bunch of bin/ directories. But, you
> path is usually confined to the standard /usr/bin /usr/local/bin
> directories. Plus, when you upgrade your java package the directory that
> those bin files are kept in, change with version number as part of the
> directory name. SO!! You have the "alternatives" scheme to handle all of
> those useful binary files that aren't in your usual path.
>
> In /etc/alternatives you'll see a BUNCH of linked files, if you do an ls
> -la
>
> You have the java command javac living in /usr/lib/jvm/jdk(+version)/bin
> Alternatives will make a link between there to /usr/bin so that javac
> can now be readily accessed. Alternatives can become screwed up in major
> fashion when you do something like switch between OpenJDK and
> OracleJava-JDK. Stuff can potentially be linked all over the damn places
> without some sort of intervention. That link I gave you, as part of it's
> script, with make all your Oracle Java links correctly for you.
>
> So, that is why I recommend you check the links yourself, just to be
> sure ...using alternatives-GTK, which is a nice little gui to admin your
> alternatives settings. I usually find at least one mistake, although the
> last time I found none. Best to be sure, while learning how your system
> works. Alternatives also gets edited when you chose Firefox over Chrome
> as your default browser, and other personal system choices, like editor
> and email reader, and such.
>
> So, to conclude our lesson, check this out:
>
> ric at iam:/usr/bin$ ls -la java
> lrwxrwxrwx 1 root root 22 Dec 6 03:15 java -> /etc/alternatives/java
> ric at iam:/etc/alternatives$ ls -la java
> lrwxrwxrwx 1 root root 39 Dec 6 03:15 java ->
> /usr/lib/jvm/java-7-oracle/jre/bin/java
>
> See? Install scripts can make changes in /etc/alternatives and then the
> change becomes available in /usr/bin using the same link there while the
> original target binary lives in a dynamic directory name structure.
>
> I hope I made it clearer to you. :) Ric
>
Interesting and informative. Before I read this and did your examples I
didn't know it even existed. This leads to another question though.
Where do you get alternatives-GTK. I don't see it in synaptic in either
10.04 or 12.04 and googling for it just gives alternatives to GTK.
Regards, Jim
More information about the ubuntu-users
mailing list