Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Oracle JDK 7 as single jdk [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
DZoom
n00b
n00b


Joined: 13 Jun 2010
Posts: 55

PostPosted: Sun Oct 30, 2011 3:37 pm    Post subject: Oracle JDK 7 as single jdk [SOLVED] Reply with quote

Does anyone have experience in using only oracle jdk 1.7 on amd64?
i wasn't sure whether to install sun-jdk or oracle-jdk-bin i chose the latter as it's the official version by now?
I still got the icedtea bin installed.
After installatation of the oracle-jdk-bini set the active vm to the oracle 1.7 version.
But i can't compile the following java 1.7 code:
Code:


import java.util.List;

public class Test {
   
   public static void main(String[] args) {
      List<String> list = ["item"];
   }
   
}


Furthermore i would like to uninstall the icedtea jdk and only keep the oracle-jdk-bin;
but it seems i would break emerge dependencies with it:
Code:

hal dzm # emerge --ask --verbose --pretend --depclean icedtea6-bin

Calculating dependencies... done!
  dev-java/icedtea6-bin-1.10.3-r2 pulled in by:
    virtual/jdk-1.6.0

>>> No packages selected for removal by depclean


Any suggestions on one of the two issues?


Last edited by DZoom on Sun Oct 30, 2011 7:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Sun Oct 30, 2011 4:28 pm    Post subject: Re: Oracle JDK 7 Reply with quote

DZoom wrote:
i wasn't sure whether to install sun-jdk or oracle-jdk-bin i chose the latter as it's the official version by now?

It is.

Quote:
But i can't compile the following java 1.7 code:
Code:


import java.util.List;

public class Test {
   
   public static void main(String[] args) {
      List<String> list = ["item"];
   }
   
}

That's because it is not valid java syntax.

Quote:
Furthermore i would like to uninstall the icedtea jdk and only keep the oracle-jdk-bin;
but it seems i would break emerge dependencies with it:
Code:

hal dzm # emerge --ask --verbose --pretend --depclean icedtea6-bin

Calculating dependencies... done!
  dev-java/icedtea6-bin-1.10.3-r2 pulled in by:
    virtual/jdk-1.6.0

>>> No packages selected for removal by depclean


Any suggestions on one of the two issues?


Try to do
Code:
emerge -1 =virtual/jdk-1.7.0
emerge --depclean -p
Back to top
View user's profile Send private message
DZoom
n00b
n00b


Joined: 13 Jun 2010
Posts: 55

PostPosted: Sun Oct 30, 2011 5:59 pm    Post subject: Re: Oracle JDK 7 Reply with quote

Voltago wrote:
DZoom wrote:
i wasn't sure whether to install sun-jdk or oracle-jdk-bin i chose the latter as it's the official version by now?

It is.

Quote:
But i can't compile the following java 1.7 code:
Code:


import java.util.List;

public class Test {
   
   public static void main(String[] args) {
      List<String> list = ["item"];
   }
   
}

That's because it is not valid java syntax.


hm, i was confused about the language support for collections. just read it should appear in java 8; sorry...

Quote:

Quote:
Furthermore i would like to uninstall the icedtea jdk and only keep the oracle-jdk-bin;
but it seems i would break emerge dependencies with it:
Code:

hal dzm # emerge --ask --verbose --pretend --depclean icedtea6-bin

Calculating dependencies... done!
  dev-java/icedtea6-bin-1.10.3-r2 pulled in by:
    virtual/jdk-1.6.0

>>> No packages selected for removal by depclean


Any suggestions on one of the two issues?


Try to do
Code:
emerge -1 virtual/jdk-1.7.0
emerge --depclean -p


Code:

hal dzm # emerge -1 virtual/jdk-1.7.0
!!! 'virtual/jdk-1.7.0' is not a valid package atom.
!!! Please check ebuild(5) for full details.


version 1.7 of jdk is hardmasked

Code:

hal dzm # eix -I virtual/jdk
[I] virtual/jdk
     Available versions: 
        (1.5)   1.5.0
        (1.6)   1.6.0
        (1.7)   [M]~1.7.0
     Installed versions:  1.6.0(1.6)(06:36:03 PM 10/13/2011)
     Description:         Virtual for JDK


do you mean to unmask it and then emerge version 1.7.?
thought there was another way around it, but if that's the way to do it...
whysoever the problems described here occured:
https://forums.gentoo.org/viewtopic-t-894046-start-0.html


Last edited by DZoom on Sun Oct 30, 2011 6:58 pm; edited 3 times in total
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Sun Oct 30, 2011 6:14 pm    Post subject: Re: Oracle JDK 7 Reply with quote

DZoom wrote:
do you mean to unmask it and then emerge version 1.7.?
thought there was another way around it? but if that's the way to do it...

If you want to get rid of icedtea6 without portage bitching, then this is how to do it. Mind you, stuff could break if there is some incompatibility between installed software and jdk7.
Back to top
View user's profile Send private message
DZoom
n00b
n00b


Joined: 13 Jun 2010
Posts: 55

PostPosted: Sun Oct 30, 2011 7:00 pm    Post subject: Re: Oracle JDK 7 Reply with quote

Voltago wrote:
DZoom wrote:
do you mean to unmask it and then emerge version 1.7.?
thought there was another way around it? but if that's the way to do it...

If you want to get rid of icedtea6 without portage bitching, then this is how to do it. Mind you, stuff could break if there is some incompatibility between installed software and jdk7.


i know...

thanks for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum