Help installing sun-java-jdk 1.5 [Solved]

Anything that pertains to Portage

Moderator: Moderators

Help installing sun-java-jdk 1.5 [Solved]

Postby craigl » Sun Oct 03, 2010 15:23

I am needing to install sun-java-jdk 1.5 for build purposes. 1.6 will not work, has to be 1.5.

With the help of someone on irc I ran

Code: Select all
emerge --sync && emerge =dev-java/sun-jdk-1.5.0.22-r1


Which returned:

Code: Select all
emerge: there are no ebuilds to satisfy "=dev-java/sun-jdk-1.5.0.22-r1".


Any suggestions?
craigl
Baby Hen
 
Posts: 8
Joined: Sun Oct 03, 2010 15:12

Re: Help installing sun-java-jdk 1.5

Postby albfneto » Sun Oct 03, 2010 16:25

this old java,may be found in the java overlay.

make these commands:

Code: Select all
sudo emerge --sync
sudo layman -a java-overlay
sudo layman -S


then,try try to re-install, and ii you want remove the java-overlay.
Image
ALBERTO FEDERMAN NETO
albfneto
albfneto@fcfrp.usp.br
Favorite Distros: Sabayon, Gentoo, Mandriva and OpenSUSE
User avatar
albfneto
Sagely Hen
 
Posts: 1288
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil

Re: Help installing sun-java-jdk 1.5

Postby Fitzcarraldo » Sun Oct 03, 2010 16:26

There is no ebuild for the package dev-java/sun-jdk-1.5.0.22-r1 in the Portage repositories, that's why it failed: http://packages.gentoo.org/package/sun-jdk

However you can find the ebuild on the following page: http://gentoo-overlays.zugaina.org/java ... en#sun-jdk, along with the files to go with it. I'm not on a Linux box at the moment, so can't check, but it may still be in the Portage Java overlay (java-overlay), so try:

Code: Select all
# emerge --sync # Actually you've done this already, so no need to do again for a week or so.
# layman -S
# layman -a java-overlay
# emerge -1v =sun-jdk-1.5.0.22-r1
# equo rescue spmsync # This is to tell Entropy what you did via Portage.


If you want to check which packages are available, you can use the command:

Code: Select all
# emerge -s sun-jdk

but it's much better to use the eix utility, which is in Entropy as well as Portage, so install from either and then do the following:

Code: Select all
# eix-update
# eix sun-jdk

If you can't find what you want from Portage or a Portage overlay, then it would be possible to create a local overlay on your HDD, download the 1.5.0.22-r1 ebuild and files to it, and merge (install) the package that way (assuming the Java repository still contains the source code for that version of the JDK, of course). You can see examples of how to install a package from a local overlay by searching the SL Forums (keywords "local overlay") or in the SL Wiki. If you get into trouble, post again and I or someone else will give you some guidance.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7328
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Help installing sun-java-jdk 1.5

Postby craigl » Sun Oct 03, 2010 19:17

After running

Code: Select all
emerge -1v =sun-jdk-1.5.0.22-r1


I get:

Code: Select all
!!! All ebuilds that could satisfy "=dev-java/sun-jdk-1.5.0.22-r1" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-java/sun-jdk-1.5.0.22-r1 (masked by: dlj-1.1 license(s))
A copy of the 'dlj-1.1' license is located at '/usr/portage/licenses/dlj-1.1'.


Thanks in advance for your help. This has been very frustrating but I have learned a ton!
craigl
Baby Hen
 
Posts: 8
Joined: Sun Oct 03, 2010 15:12

Re: Help installing sun-java-jdk 1.5

Postby craigl » Sun Oct 03, 2010 19:27

Nevermind, I think I got it.

I added ACCEPT_LICENSE="dlj-1.1" into etc/make.conf

It installed with no errors, but it appears that something is still missing.

When I run the make command and am throwing an error.

Code: Select all
No rule to make target `run-java-tool'


Perhaps a symlink is missing somewhere?
craigl
Baby Hen
 
Posts: 8
Joined: Sun Oct 03, 2010 15:12

Re: Help installing sun-java-jdk 1.5

Postby Fitzcarraldo » Sun Oct 03, 2010 22:57

You'll probably find you need to select your Java VM. See the Gentoo Java Guide.

In your case I think it's going to be something like:

Code: Select all
# eselect java-vm set user sun-jdk-1.5
# eselect java-vm set system sun-jdk-1.5

You can either use the eselect command or the java-config command to do it -- see the aforementioned Gentoo Java Guide for the syntax.

Just for information, below is the current setting on my laptop:

Code: Select all
# java-config --list-available-vms
The following VMs are available for generation-2:
1)      IcedTea6-bin 1.8.1 [icedtea6-bin]
*)      Sun JDK 1.6.0.21 [sun-jdk-1.6]
3)      Sun JRE 1.6.0.21 [sun-jre-bin-1.6]

VMs marked as Build Only may contain Security Vulnerabilities and/or be EOL.
Gentoo recommends not setting these VMs as either your System or User VM.                                                                                                             
Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7328
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Help installing sun-java-jdk 1.5

Postby craigl » Mon Oct 04, 2010 2:04

I had used the java-config command to set them, but i went ahead and gave your suggestion a shot. Still getting the same error with the make command.

Code: Select all
make: *** No rule to make target `run-java-tool', needed by `out/target/common/docs/api-stubs-timestamp'.  Stop.


I am starting to think it isnt meant to be.
craigl
Baby Hen
 
Posts: 8
Joined: Sun Oct 03, 2010 15:12

Re: Help installing sun-java-jdk 1.5

Postby Fitzcarraldo » Mon Oct 04, 2010 2:26

Code: Select all
export PATH=$(java-config -O)/bin:$PATH

Then try the make.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7328
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Help installing sun-java-jdk 1.5

Postby craigl » Mon Oct 04, 2010 2:38

Same result.
craigl
Baby Hen
 
Posts: 8
Joined: Sun Oct 03, 2010 15:12

Re: Help installing sun-java-jdk 1.5

Postby Fitzcarraldo » Mon Oct 04, 2010 11:28

What does the following give you?:

Code: Select all
java-config -O

Also:

Code: Select all
# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
# export PATH=$(java-config -O)/bin:$PATH
# echo $PATH
/opt/sun-jdk-1.6.0.21/bin:/sbin:/bin:/usr/sbin:/usr/bin
# locate run-java-tool
/usr/bin/run-java-tool
#
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7328
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Next

Return to Portage|Emerge Package Managers

Who is online

Users browsing this forum: No registered users and 0 guests