Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install JDK 1.5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Fri Jul 13, 2012 6:49 pm    Post subject: Install JDK 1.5 Reply with quote

I am trying to install JDK 1.5 on my Geotoo 12.1, I used command
Code:
emerge virtual/jdk


It always installs the version 1.6 (virtual/jdk-1.6.0.r1)

I check the available versions with command

Code:
eix virtual/jdk


it prints out version (1.5) (1.6) (1.7)

Please help me
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Jul 13, 2012 7:20 pm    Post subject: Reply with quote

zuoshulu,

Welcome to Gentoo.

You need to tell emerge you don't want the current version. There are several ways, depending on why you want an old jre.

Code:
emerge =virtual/jdk-1.5.0
will gte you version 1.5.0 but portage will forget you wanted an old version and will offer to update it for you.
To tell portage you want to keep the old version add
Code:
>virtual/jdk-1.5.0
to your /etc/portage/package.mask file.
IF this is the first time you have used that file, you will have to create it.

Now portage will be blind to jdk versions above 1.5.0. Thats the easy bit. The virtual/jdk-1.5.0 points to dev-java/sun-jdk and the corresponding ebuild is no longer in the tree. You need to make your own overlay, as described in the handbook and fetch the ebuild from here.

From memory, sun-jdk has always been fetch restricted, which means you must find the tarball on Oracles website.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Fri Jul 13, 2012 7:50 pm    Post subject: Reply with quote

Thank you for your reply, I tried
Code:
emerge =virtual/jdk-1.5.0
, but emerge looked for file ibm-java2-sdk-5.0-12.5-linux-i386.tgz. I went to ibm site, in old download area, I could not find the file 5.0-12.5, I only found 5.0-13.1

NeddySeagoon wrote:
zuoshulu,

Welcome to Gentoo.

You need to tell emerge you don't want the current version. There are several ways, depending on why you want an old jre.

Code:
emerge =virtual/jdk-1.5.0
will gte you version 1.5.0 but portage will forget you wanted an old version and will offer to update it for you.
To tell portage you want to keep the old version add
Code:
>virtual/jdk-1.5.0
to your /etc/portage/package.mask file.
IF this is the first time you have used that file, you will have to create it.

Now portage will be blind to jdk versions above 1.5.0. Thats the easy bit. The virtual/jdk-1.5.0 points to dev-java/sun-jdk and the corresponding ebuild is no longer in the tree. You need to make your own overlay, as described in the handbook and fetch the ebuild from here.

From memory, sun-jdk has always been fetch restricted, which means you must find the tarball on Oracles website.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Jul 13, 2012 8:02 pm    Post subject: Reply with quote

zuoshulu,

Maybe its name changed? Is this the page you need?

You need not try to emerge the virtual. Virtual ebuilds provide portage with a list of real ebuilds, any one of which can be used to satisfy a dependancy on the virtual.
The one nearest the top of the list will be used when you install a package that depends on the virtual, if you don't have another package in the list installed already.

From reading the virtual, I had in mind that you would want the sun-jre-1.5.0.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Fri Jul 13, 2012 8:40 pm    Post subject: Reply with quote

Emerge looks for the file ibm-java2-sdk-5.0-12.5-linux-i386.tgz, I found the file and copy it to /usr/portage/distfiles folder
https://www6.software.ibm.com/sdfdl/1v2/regs2/linuxjavasdks/java/java5/SR12-FP5/linuxia32/Xa.2/Xb.V4HO5ljJ5voGscXzLBKVXiNUQS8W5XRFMKSz0yBqXQ/Xc.java/java5/SR12-FP5/linuxia32/ibm-java2-sdk-5.0-12.5-linux-i386.tgz/Xd./Xf.LPr.D1vk/Xg.6593539/Xi.sdk5/XY.regsrvs/XZ.jLFjioSNogUxmgs5a8afAyAIt6I/ibm-java2-sdk-5.0-12.5-linux-i386.tgz

However, it still prints the same errors message and ask me to copy the file to /usr/portage/distfiles folder

sorry I can not copy and paste my terminal output here, I am running Geotoo in Virtual Box,
NeddySeagoon wrote:
zuoshulu,

Maybe its name changed? Is this the page you need?

You need not try to emerge the virtual. Virtual ebuilds provide portage with a list of real ebuilds, any one of which can be used to satisfy a dependancy on the virtual.
The one nearest the top of the list will be used when you install a package that depends on the virtual, if you don't have another package in the list installed already.

From reading the virtual, I had in mind that you would want the sun-jre-1.5.0.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Jul 13, 2012 9:15 pm    Post subject: Reply with quote

zuoshulu,

Some of these fetch restrited files want the file names changed when they are copyied to /usr/src/distfiles.

The emerge will have left you a log file and told you whet the log is when it exited.

Code:
emerge wgetpaste
wgetpaste /full/path/to/log

Post the URL you get back from wgetpaste.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Sat Jul 14, 2012 7:31 am    Post subject: Reply with quote

Masking >jdk-1.5 maybe isn't what you want as a lot already requires a jdk-1.6. The alternative is to add virtual/jdk:1.5 to your world file.

sun-jdk:1.4 and sun-jdk:1.5 are still available in the java-overlay (layman -a java-overlay) They were moved there after they became EOL.

ibm-jdk-bin will require you to register an account.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Mon Jul 16, 2012 1:17 pm    Post subject: Reply with quote

NeddySeagoon wrote:
zuoshulu,

Some of these fetch restrited files want the file names changed when they are copyied to /usr/src/distfiles.

The emerge will have left you a log file and told you whet the log is when it exited.

Code:
emerge wgetpaste
wgetpaste /full/path/to/log

Post the URL you get back from wgetpaste.


Tried
Code:
 emerge =virtual/jdk-1.5.0

I ran wgetpaste, then my error output was pasted under http://bpaste.net/show/35253
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 1:20 pm    Post subject: Reply with quote

sera wrote:
Masking >jdk-1.5 maybe isn't what you want as a lot already requires a jdk-1.6. The alternative is to add virtual/jdk:1.5 to your world file.

sun-jdk:1.4 and sun-jdk:1.5 are still available in the java-overlay (layman -a java-overlay) They were moved there after they became EOL.

ibm-jdk-bin will require you to register an account.


How to add virtual/jdk:1.5 to my world file?

How to get JDK1.5 from java-overlay?

I have got a ibm account to download jdk "ibm-java2-sdk-5.0-12.5-linux-i386.tgz" from
https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=sdk5&S_PKG=intel5sr12fp5&S_TACT=105AGX05&S_CMP=JDK
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jul 17, 2012 8:24 pm    Post subject: Reply with quote

zuoshulu wrote:
How to get JDK1.5 from java-overlay?
Code:
emerge layman
layman --add java-overlay
emerge -v sun-jdk:1.5
emerge -v virtual/jdk:1.5
Make keyword changes as necessary.

zuoshulu wrote:
How to add virtual/jdk:1.5 to my world file?
The last command above handles it for you.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 8:37 pm    Post subject: Reply with quote

John R. Graham wrote:
zuoshulu wrote:
How to get JDK1.5 from java-overlay?
Code:
emerge layman
layman --add java-overlay
emerge -v sun-jdk:1.5
emerge -v virtual/jdk:1.5
Make keyword changes as necessary.

zuoshulu wrote:
How to add virtual/jdk:1.5 to my world file?
The last command above handles it for you.

- John


Thank you for your reply, i emerged layman, but when i try

Code:
layman --add java-overlay


I got error

Quote:
Overlay "java-overlay" does not exist.


I tried emerge java-overlay i got error

Quote:
emerge: there are no ebuilds to satisfy "java-overlay"
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jul 17, 2012 8:39 pm    Post subject: Reply with quote

Argh. My fault. Do
Code:
layman --fetch
and then try again. I thought it would do that automatically the first time.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 8:43 pm    Post subject: Reply with quote

John R. Graham wrote:
Argh. My fault. Do
Code:
layman --fetch
and then try again. I thought it would do that automatically the first time.

- John


Code:
emerge -v sun-jdk:1.5


output
Quote:
emerge: there are no ebuilds to satisfy "sun-jdk:1.5"
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jul 17, 2012 8:50 pm    Post subject: Reply with quote

Were you able to successfully add the java-overlay? If not, what were the error messages?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 8:57 pm    Post subject: Reply with quote

John R. Graham wrote:
Were you able to successfully add the java-overlay? If not, what were the error messages?

- John


I did the fetch thing, then
Code:
layman --add java-overlay


it could not find svn, i tried

emerge dev/vcs/subversion

then
Code:
layman --add java-overlay
went through, i saw many files were installed
i tried again with
Code:
layman --add java-overlay


the system say "java-overlay" already in the local list!
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 9:11 pm    Post subject: Reply with quote

why emerge does not find ebuilds for jdk 1.5?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jul 17, 2012 9:16 pm    Post subject: Reply with quote

Hmm.
layman man page wrote:
Just add the following line to the end of your /etc/make.conf file:

source /var/lib/layman/make.conf
That should allow Portage to see the overlays.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 9:29 pm    Post subject: Reply with quote

John R. Graham wrote:
Hmm.
layman man page wrote:
Just add the following line to the end of your /etc/make.conf file:

source /var/lib/layman/make.conf
That should allow Portage to see the overlays.

- John


Wow, it worked, i am building my tegra linux now
Back to top
View user's profile Send private message
zuoshulu
n00b
n00b


Joined: 13 Jul 2012
Posts: 34

PostPosted: Tue Jul 17, 2012 9:47 pm    Post subject: Reply with quote

I got other building error can you help me under

https://forums.gentoo.org/viewtopic-p-7090840.html#7090840
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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