You are not logged in.

#1 2011-11-06 16:30:48

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

[SOLVED] How to replace OpenJDK with Oracle JRE/JDK

I'm new to Arch linux and so far I'm really liking it except I'm having a lot of Java troubles. I do a lot of python and java development in eclipse and every time I try to install certain plugins eclipse basically breaks and I have to delete the whole thing and re-install. Specifically, if I try to install the Aptana plugin or even the eclipse color themes plugin this happens.

I'm pretty sure that OpenJDK is the culprit, so I'd like to remove it and install the Oracle jre/jdk. I've searched on google and the Arch forums for a good tutorial on how to do this now that the Oracle packages are not in the package repository, but I can't seem to find anything. I know the Oracle packages are in the AUR but I'm not exactly sure what I need to do to completely remove OpenJDK. When I tried to just remove it I got a bunch of error messages about dependencies and it wouldn't remove it.

So if anyone could point me in the direction of an existing tutorial, or give me some instruction on what I need to do this it would be much appreciated.

Thanks!

Last edited by deadguy1969 (2011-11-06 18:53:16)

Offline

#2 2011-11-06 16:34:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

Please read pacman's man page (this will help with the dependencies errors).

Please search the forums before posting: https://bbs.archlinux.org/viewtopic.php?id=129765

Last edited by karol (2011-11-06 16:37:44)

Offline

#3 2011-11-06 16:40:47

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

Oh, perfect. I searched the forums but somehow missed this. This should be really helpful. Thanks

Offline

#4 2011-11-06 18:06:28

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

Ok, so I followed the instructions on the thread you gave me, but when I finished building the package and ran pacman -U jre-7-1-x86_64.pkg.tar.xz I got this message:

:: jre and openjdk6 are in conflict (java-runtime). Remove openjdk6? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: eclipse: requires java-environment
:: libreoffice-sdk: requires java-environment
:: netbeans: requires java-environment


Can I force it to upgrade anyway or is there something else I need to do?

Offline

#5 2011-11-06 18:10:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

According to comments on https://aur.archlinux.org/packages.php?ID=51908 you need jdk https://aur.archlinux.org/packages.php?ID=51906 because jre provides only java-runtime. jdk provides java-environment.

I think you need to build and install jdk.

Last edited by karol (2011-11-06 18:12:20)

Offline

#6 2011-11-06 18:14:16

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

I tried that but it tells me that JRE is a dependency of JDK. This is the message:

==> Making package: jdk 7-1 (Sun Nov  6 12:13:04 CST 2011)
==> Checking runtime dependencies...
==> Missing Dependencies:
  -> jre
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

Any ideas?

Offline

#7 2011-11-06 18:15:43

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 603

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

I'm the next tired to fight with java-related packages in aur (I have presented suggestions but they were ignored). During few minutes all problems were resolved with fake-java https://aur.archlinux.org/packages.php?ID=50317 and manual Oracle JDK installation (just have appended PATH and set JAVA_HOME after installation).


"I exist" is the best myth I know..

Offline

#8 2011-11-06 18:18:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

@deadguy1969
You can remove openjdk6 with 'pacman -Rdd openjdk6' and install jre. Then you need to install jdk because eclipse, netbeans and friends won't work.

Offline

#9 2011-11-06 18:20:20

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

okay, so I should remove openjdk6 first, then install jdk, and finally install jre? Won't that still give me the problem of jre being a dependency?

EDIT: Sorry, I misread your post. I see now you said to install jre first. I guess I'll give this a shot.

Last edited by deadguy1969 (2011-11-06 18:21:12)

Offline

#10 2011-11-06 18:31:41

Cheesecake Charlie
Member
Registered: 2011-09-08
Posts: 94

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

@deadguy1969

To do as the thread suggested, you need to install jre first and then use the same method to install jdk.  It works just fine.
Hope it helps

Offline

#11 2011-11-06 18:37:04

deadguy1969
Member
Registered: 2011-11-06
Posts: 6

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

It worked! Thank you so much. I really appreciate all your help.

Offline

#12 2011-11-06 18:43:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to replace OpenJDK with Oracle JRE/JDK

Please remember to mark the thread as solved.

Offline

Board footer

Powered by FluxBB