You are not logged in.

#1 2011-11-06 09:40:43

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

[ SOLVED ] ......... Change openjdk6 to oracle jdk7

Hi All

I initially installed openjdk6 but having some issues with apps like intellij idea & phpstorm and so i want to change to oracle jdk7.  Whats the best way to change them, can i install the downloaded jdk7 from oracle instead of using AUR ?

Cheers

Last edited by Cheesecake Charlie (2011-11-06 12:08:45)

Offline

#2 2011-11-06 09:45:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

You can, but why would you do that? You should keep all apps on your system under pacman's control.

Offline

#3 2011-11-06 09:53:21

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

tomk wrote:

You can, but why would you do that? You should keep all apps on your system under pacman's control.

So are you suggesting that i stick with openjdk then ?

Offline

#4 2011-11-06 09:57:43

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

No, we suggest that you use the AUR if avaliable, or write a PKGBUILD for it if don't.

You should not install apps outside pacman's control, but that doesn't mean you shouldn't install that apps, only that you should do it using a package


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#5 2011-11-06 10:01:15

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

ethail wrote:

No, we suggest that you use the AUR if avaliable, or write a PKGBUILD for it if don't.

You should not install apps outside pacman's control, but that doesn't mean you shouldn't install that apps, only that you should do it using a package

Got ya ... As there are dependencies, what is the best way to remove one and install the other ? ie pacman -Rd openjdk6 && yaourt -Syua jdk

Cheers

Offline

#6 2011-11-06 10:08:06

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Most probably when you build the new package and issue pacman -U, the package should be seamlessly replaced without much trouble.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#7 2011-11-06 10:18:20

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Have just ran sudo pacman -R openjdk6 && yaourt -Syua jdk and i get this error

error: failed to prepare transaction ( could not satisfy dependencies )

What do i need to do ?

Cheers

Offline

#8 2011-11-06 10:19:51

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Could you specify exactly which package causes the conflict?

BTW: Try not to remove openjdk6, run pacman -U instead.

Last edited by bohoomil (2011-11-06 10:20:52)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#9 2011-11-06 10:28:18

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

bohoomil wrote:

Could you specify exactly which package causes the conflict?

BTW: Try not to remove openjdk6, run pacman -U instead.

These are the errors i get

error: failed to prepare transaction (could not satisfy dependencies)
:: eclipse-ecj: requires java-runtime
:: icedtea-web: requires openjdk6
:: java-commons-daemon: requires java-runtime
:: java-jsp2.2-tomcat: requires java-environment>=5
:: java-servlet3.0-tomcat: requires java-environment>=5
:: tomcat7: requires java-runtime>=6

Pardon my ignorance, but how would i run pacman -U to install jdk7 ?

Cheers

Offline

#10 2011-11-06 10:30:06

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Pick up the jdk packages you've just built (should be in your build directory), and let pacman upgrade it (pacman -U jdk_package_file.xz).

Last edited by bohoomil (2011-11-06 10:30:42)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#11 2011-11-06 10:33:51

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

bohoomil wrote:

Pick up the jdk packages you've just built (should be in your build directory), and let pacman upgrade it (pacman -U jdk_package_file.xz).

I've not built any packages and have not yet ventured into doing that in archlinux yet ... smile

Last edited by Cheesecake Charlie (2011-11-06 10:37:12)

Offline

#12 2011-11-06 10:37:36

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

You've got jdk from AUR, right? If yaourt checks dependencies before building the package itself, I'd simply grab the PKGBUILD, run makepkg on it and then upgrade jdk using pacman. That's my way, checked and working.

Last edited by bohoomil (2011-11-06 10:38:42)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#13 2011-11-06 10:41:56

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

bohoomil wrote:

You've got jdk from AUR, right? If yaourt checks dependencies before building the package itself, I'd simply grab the PKGBUILD, run makepkg on it and then upgrade jdk using pacman. That's my way, checked and working.

Nope, still a noobie when it comes to this ...

Offline

#14 2011-11-06 10:45:47

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Oh boy, simply try and do it -- it's really not as challenging as it seems. With all the AUR helpers you often take twice that long route. Doing things directly is much easier and safer. Believe me. wink


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#15 2011-11-06 10:47:57

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

So is this correct ..

Just ran yaourt -S jdk, its gone through all the dependency checks and built the apps.  So then instead of continuing to install, do i just run pacman -U jdk instead ?

Offline

#16 2011-11-06 10:51:49

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

No, don't use yaourt at all. Grab the package (https://aur.archlinux.org/packages.php?ID=51906), extract the content, go to the directory containing PKGBUILD, run makepkg and when the package is ready you'll have it there -- or at least a symlink to it. Then run pacman -U the_package_you_have_just_created.xz and see if things work. Of course, when asked if you want to replace openjdk because it conflicts with jdk, answer Yes.

Last edited by bohoomil (2011-11-06 10:52:29)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#17 2011-11-06 11:10:07

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Ok i think i get it now.  Sorted and thanks for the help smile

Cheers

Last edited by Cheesecake Charlie (2011-11-06 11:18:37)

Offline

#18 2011-11-06 11:14:46

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Although I use only Oracle jre, I presume jdk should be enough. If for some reason it isn't, do the same with jre. I doubt it'll be necessary, though.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#19 2011-11-06 11:59:18

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

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

Had to install jre first and then install jdk ... But success, its sorted, plus its cleaned up the problem of some artifacts being left on my screen after some apps close.  Will use this method in future instead of using yaourt ..

Many thanks for the help

Offline

#20 2011-11-06 12:02:13

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [ SOLVED ] ......... Change openjdk6 to oracle jdk7

I'm glad to hear that. Please, mark the thread as [SOLVED] so others can benefit from it.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

Board footer

Powered by FluxBB