LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 01-07-2006, 10:00 PM   #1
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Rep: Reputation: 15
Can't make JAVA to work in Fedora Core 4


Hello Gurus,
I've been playing around with this for a whole day now and can't seem to make JAVA (JRE / JDK) work in my FC4 box. Could you gurus help me debug my system? Reinstallation of FC4 is not an option right now since I have other applications already working. Here's what I have done:

1) Went to Java site and downloaded JRE-rpm.bin. Extracted it and tested using Java's testing site and failed.
2) Used the JRE.bin and extracted. Did that and failed.
3) Found excellent Stanton Finley's site. Followed steps using 1st option - jpackage.org. Tried and failed.
4) Followed Stanton's 2nd option which is basically installing JRE in /opt directory then linking it to mozilla library. I did yum update as suggested prior to performing the steps in the 2nd option. Tried and failed.

I fear I have too many installs have taken place and pretty much messed up the whole Java install. When I do "aboutlugins" on my browser, it doesn't even show Java in there. When I do "alternatives --config java", I only see 1 option (/opt...) instead of 2 options.

Could you please help?

Thanks in advance.

Jun Tuko

Last edited by jun_tuko; 01-08-2006 at 01:01 PM.
 
Old 01-08-2006, 02:21 AM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Your best bet for installing Java is to download the JRE binary from sun.com.

Follow the instructions here (General Instructions)

Basically, you download and run the JRE binary, add some lines to ~/.bashrc to set your $PATH, and then install the firefox plugin.

Post back here if you have any problems
--Ian
 
Old 01-08-2006, 12:59 PM   #3
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hi ian,
thanks so much for your reply. i have tried installing jre following sun's instructions from their website. i downloaded the file jre-xxxxxx-.rpm.bin extracted it and did not work. same with the file jre-xxxxxx-.bin.

i found a couple of sites, one from official fedora core 4 site, that talks about not using the files from sun. the other site is http://stanton-finley.net/fedora_cor...otes.html#Java
which provides 2 options and step by step installation of jre. i tried both and still did not work. after all the installation, when i check my mozilla browser, it doesnt show any java plugin.

thanks again and hope you reply back.

jun
 
Old 01-08-2006, 01:16 PM   #4
dimsh
Member
 
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
did you set the JAVA_HOME evironment variable?
 
Old 01-08-2006, 01:54 PM   #5
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hi dimsh,
thanks for helping out. i just followed the steps provided to me on the sites. from my readings and searchings, it seems a lot of users got their fix from the last install i did which came from stanton's site. it has these steps:

1) run "yum update" then reboot.
2) download jre-5-xxxxx.bin (self extracting, not the rpm).
3) change to root (user).
4) move the downloaded file to /opt folder.
5) go to /opt folder.
6) issue command chmod +x file.bin
7) execute the file ( ./*.bin)
8) issue this command: ln -s /opt/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
9) run command: gedit /etc/profile.d/java.sh
10) type the following lines to the file java.sh:

export J2RE_HOME=/opt/jre1.5.0_06
export PATH=$J2RE_HOME/bin:$PATH

11) issue command: source /etc/profile.d/java.sh
12) issue comand:
which java

** i saw "/opt/jre1.5.0_06/bin/java" as expected.

13) issue command:
/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5.0_06/bin/java 2

14) issue command:
/usr/sbin/alternatives --config java

**this part i got only 1 option. the expected return was:

There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------

*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /opt/jre1.5.0_06/bin/java

Enter to keep the current selection[+], or type selection number:


i got:

# /usr/sbin/alternatives --config java

There is 1 program that provides 'java'.

Selection Command
-----------------------------------------------
*+ 1 /opt/jre1.5.0_06/bin/java

Enter to keep the current selection[+], or type selection number:


i entered 1.

15) issued command:
/usr/sbin/alternatives --display java

** i got a return of:
java - status is manual.
link currently points to /opt/jre1.5.0_06/bin/java
...


these steps did not work for me. any clues? seems like the path is already taken care of when i created that java.sh file from step 10 above.

any input will be appreciated. thanks guys!

jun
 
Old 01-08-2006, 04:40 PM   #6
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
ok guys, this thing is SOLVED!!! yeahhhh!!!

thanks first off to those who responded. i appreciate it!

please refer to my original post. the first 2 installations following sun's instructions were a definite no-no per fedora core 4 site. the 4rth step from stanton, i don't know why it did not work for me. but again, i read some threads on different forums and found a lot got this one working so you may want to try this step first.

now, the 3rd step, which came from http://fedoranews.org/mediawiki/inde...e_Java_for_FC4
did not work for me the first time i did it because "i was not thinking". the problem was i downloaded jdk 1.5 version 6 and tried to rebuild from jpackage using java 1.5 version 5. wenkkkk!!! when you go to jpackage to download there isn't a version 6 (as of today 1/8/2006) only version 5. so when it did not compile and run, i considered it as a fail. anyway, after i doing stanton's second option and failed, i went back and do stanton's first option which is using jpackage. here's the thing:

**follow the instructions as listed, from the link above or scroll below. i copied the steps here just in case their site is inaccessible. but make sure to download "jdk 1.5 version 5" from sun's website. i had a hard time finding it, but here's the link:

https://jsecom16d.sun.com/ECom/EComA...F407E0B143D86F

i registered here, provided basic personal info etc. then after your logged in, copy and paste this link to the same browser you're using (just to make you stay logged in):

https://jsecom15k.sun.com/ECom/EComA...37D07538C9779C

then download the appropriate file. remember to ger ***.linux-i586.bin and NOT the ***.linux-i586.rpm.bin. that should do it, just follow the rest of the installation instructions.

goodluck and have fun!!!!

***********************************************
stanton's site (there's a lot of goodies here - a must check out for noobs like me!)

http://stanton-finley.net/fedora_cor...otes.html#Java

********************************************
STEP / INSTRUCTIONS

6.1.8. Java Package Recommendations

Fedora Core 4 users are advised not to use the Java RPM provided by Sun. It contains Provides that conflict with names used in packages provided as part of Fedora Core 4. Because of this, Sun Java might disappear from an installed system during package upgrade operations. Fedora Core 4 users should use either the RPM from jpackage.org or manually install the Sun Java tarball into /opt. Sun Java 1.5+ is recommended for stability purposes.
Table of contents [showhide]
1 Install fedora-rpmdevtools from Extras
2 Build rpmbuild tree
3 Install jpackage.repo from JPackage
4 Download jdk-1_5_0_05-linux-i586.bin from Sun
5 Copy jdk-1_5_0_05-linux-i586.bin to SOURCES
6 Download java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm from JPackage
7 Build java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm
8 Invalid rpath ???
9 Install java packages
10 Unsigned package ???
11 Check java version
12 Firefox plugin
13 Switching between java implementations
[edit]
Install fedora-rpmdevtools from Extras

[localhost ~]$ sudo yum install fedora-rpmdevtools
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:01
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for fedora-rpmdevtools to pack into transaction set.
fedora-rpmdevtools-1.1-1. 100% |=========================| 20 kB 00:00
---> Package fedora-rpmdevtools.noarch 0:1.1-1.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
fedora-rpmdevtools noarch 1.1-1.fc4 extras 59 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 59 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): fedora-rpmdevtools 100% |=========================| 59 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: fedora-rpmdevtools ######################### [1/1]

Installed: fedora-rpmdevtools.noarch 0:1.1-1.fc4
Complete!
[localhost ~]$

[edit]
Build rpmbuild tree

[localhost ~]$ fedora-buildrpmtree
[localhost ~]$ ls
Desktop download rpmbuild
[localhost ~]

[edit]
Install jpackage.repo from JPackage

[localhost ~]$ cd /etc/yum.repos.d/
[localhost yum.repos.d]$ sudo wget http://www.jpackage.org/jpackage.repo
--11:38:19-- http://www.jpackage.org/jpackage.repo
=> `jpackage.repo'
Resolving www.jpackage.org... 212.85.153.228
Connecting to www.jpackage.org[212.85.153.228]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 629 [text/plain]

100%[======================================================>] 629 --.--K/s

11:38:20 (1.30 MB/s) - `jpackage.repo' saved [629/629]

[localhost yum.repos.d]$

[edit]
Download jdk-1_5_0_05-linux-i586.bin from Sun

1) Go to http://java.sun.com/j2se/1.5.0/download.jsp

2) Click on Download JDK 5.0 Update 5

3) Click on Accept License Agreement

4) Download jdk-1_5_0_05-linux-i586.bin by clicking on "Linux self-extracting file"
[edit]
Copy jdk-1_5_0_05-linux-i586.bin to SOURCES

You might have a different download directory for your browser.

[localhost ~]$ cd download/
[localhost download]$ ls
jdk-1_5_0_05-linux-i586.bin
[localhost download]$ cp jdk-1_5_0_05-linux-i586.bin ~/rpmbuild/SOURCES/
[localhost download]$

[edit]
Download java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm from JPackage

[localhost ~]$ cd download
[localhost download]$ wget http://mirrors.dotsrc.org/jpackage/1....0.05-1jpp.nos
--11:24:23-- http://mirrors.dotsrc.org/jpackage/1...1jpp.nosrc.rpm
=> `java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm'
Resolving mirrors.dotsrc.org... 130.225.247.87
Connecting to mirrors.dotsrc.org[130.225.247.87]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15,807 [application/x-redhat-package-manager]

100%[==================================================================================>] 15,807 11.42K/s

11:24:25 (11.41 KB/s) - `java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm' saved [15,807/15,807]
[localhost download]$

[edit]
Build java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm

[localhost download]$ rpmbuild --rebuild java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm
Installing java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID c431416d
warning: user jacorley does not exist - using root
warning: group ncsu does not exist - using root
warning: user jacorley does not exist - using root
warning: group ncsu does not exist - using root
warning: user jacorley does not exist - using root
warning: group ncsu does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.18245
+ umask 022
+ cd /home/phowarth/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /home/phowarth/rpmbuild/BUILD/jdk1.5.0_05
+ export MORE=10000
+ MORE=10000
+ sh /home/phowarth/rpmbuild/SOURCES/jdk-1_5_0_05-linux-i586.bin
...
omitted
...
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm
Wrote: /home/phowarth/rpmbuild/RPMS/i586/java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.26052
+ umask 022
+ cd /home/phowarth/rpmbuild/BUILD
+ cd jdk1.5.0_05
+ rm -rf /var/tmp/java-1.5.0-sun-1.5.0.05-1jpp-buildroot
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.26052
+ umask 022
+ cd /home/phowarth/rpmbuild/BUILD
+ rm -rf jdk1.5.0_05
+ exit 0
[localhost download]$

[edit]
Invalid rpath ???

If you get the following error:

+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/heapTracker/lib/libheapTracker.so' contains an invalid rpath
'$ORIGIN/../../../../lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/heapTracker/lib/libheapTracker.so' contains an invalid rpath
'$ORIGIN/../../../../jre/lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/heapTracker/lib/libheapTracker_g.so' contains an invalid rpath
'$ORIGIN/../../../../lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/heapTracker/lib/libheapTracker_g.so' contains an invalid rpath
'$ORIGIN/../../../../jre/lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/mtrace/lib/libmtrace.so' contains an invalid rpath
'$ORIGIN/../../../../lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/mtrace/lib/libmtrace.so' contains an invalid rpath
'$ORIGIN/../../../../jre/lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/mtrace/lib/libmtrace_g.so' contains an invalid rpath
'$ORIGIN/../../../../lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
ERROR: file '/usr/share/java-1.5.0-sun/demo/jvmti/mtrace/lib/libmtrace_g.so' contains an invalid rpath
'$ORIGIN/../../../../jre/lib/i386' in [$ORIGIN/../../../../lib/i386:$ORIGIN/../../../../jre/lib/i386]
error: Bad exit status from /var/tmp/rpm-tmp.68469 (%install)

Try it again after commenting out the line with "check-rpaths" in your ~/.rpmmacros

%_topdir %(echo $HOME)/rpmbuild
%_smp_mflags -j3
#%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot

[edit]
Install java packages

[localhost ~]$ cd ~/rpmbuild/RPMS/i586/
[localhost i586]$ ls -1
java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm
java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm
[localhost i586]$ sudo yum localinstall *.rpm
Setting up Local Package Process
Examining java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-alsa - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-demo - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-devel - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-fonts - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-jdbc - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-plugin - 1.5.0.05-1jpp.i586
Examining java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm: java-1.5.0-sun-src - 1.5.0.05-1jpp.i586
Marking java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm to be installed
Marking java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm to be installed
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package java-1.5.0-sun-src.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-alsa.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-devel.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-plugin.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-fonts.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-jdbc.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun.i586 0:1.5.0.05-1jpp set to be updated
---> Package java-1.5.0-sun-demo.i586 0:1.5.0.05-1jpp set to be updated
--> Running transaction check
Setting up repositories
extras 100% |=========================| 1.1 kB 00:00
updates-released 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Finished
--> Processing Dependency: /usr/lib/libodbcinst.so for package: java-1.5.0-sun-jdbc
Importing Additional filelist information for dependency resolution
filelists.xml.gz 100% |=========================| 2.3 MB 00:00
extras : ################################################## 2324/2324
Added 671 new packages, deleted 3 old in 13.91 seconds
filelists.xml.gz 100% |=========================| 2.9 MB 00:00
updates-re: ################################################## 966/966
Added 484 new packages, deleted 486 old in 32.98 seconds
--> Processing Dependency: /usr/lib/libodbc.so for package: java-1.5.0-sun-jdbc
Importing Additional filelist information for dependency resolution
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package unixODBC.i386 0:2.2.11-3.FC4.1 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-3.FC4.1 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
java-1.5.0-sun i586 1.5.0.05-1jpp java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm 84 M
java-1.5.0-sun-alsa i586 1.5.0.05-1jpp java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm 64 k
java-1.5.0-sun-demo i586 1.5.0.05-1jpp java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm 14 M
java-1.5.0-sun-devel i586 1.5.0.05-1jpp java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm 12 M
java-1.5.0-sun-fonts i586 1.5.0.05-1jpp java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm 2.0 M
java-1.5.0-sun-jdbc i586 1.5.0.05-1jpp java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm 66 k
java-1.5.0-sun-plugin i586 1.5.0.05-1jpp java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm 1.9 M
java-1.5.0-sun-src i586 1.5.0.05-1jpp java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm 17 M
Installing for dependencies:
unixODBC i386 2.2.11-3.FC4.1 updates-released 859 k
unixODBC-devel i386 2.2.11-3.FC4.1 updates-released 811 k

Transaction Summary
=============================================================================
Install 10 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 132 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): unixODBC-2.2.11-3. 100% |=========================| 859 kB 00:00
(2/2): unixODBC-devel-2.2 100% |=========================| 811 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: java-1.5.0-sun ####################### [ 1/10]
Installing: unixODBC ####################### [ 2/10]
Installing: unixODBC-devel ####################### [ 3/10]
Installing: java-1.5.0-sun-src ####################### [ 4/10]
Installing: java-1.5.0-sun-alsa ####################### [ 5/10]
Installing: java-1.5.0-sun-devel ####################### [ 6/10]
Installing: java-1.5.0-sun-plugin ####################### [ 7/10]
Installing: java-1.5.0-sun-fonts ####################### [ 8/10]
Installing: java-1.5.0-sun-jdbc ####################### [ 9/10]
Installing: java-1.5.0-sun-demo ####################### [10/10]

Installed: java-1.5.0-sun.i586 0:1.5.0.05-1jpp java-1.5.0-sun-alsa.i586 0:1.5.0.05-1jpp java-1.5.0-sun-demo.i586 0:1.5.0.05-1jpp java-1.5.0-sun-devel.i586 0:1.5.0.05-1jpp java-1.5.0-sun-fonts.i586 0:1.5.0.05-1jpp java-1.5.0-sun-jdbc.i586 0:1.5.0.05-1jpp java-1.5.0-sun-plugin.i586 0:1.5.0.05-1jpp java-1.5.0-sun-src.i586 0:1.5.0.05-1jpp
Dependency Installed: unixODBC.i386 0:2.2.11-3.FC4.1 unixODBC-devel.i386 0:2.2.11-3.FC4.1
Complete!
[localhost i586]$

[edit]
Unsigned package ???

If you get something similar to Package java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm is not signed and none of the Java packages are installing using yum, try commenting out the line with gpgcheck temporarily in /etc/yum.conf

This is normal since these packages were built locally and they were not signed by JPackage build system.

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
#gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

Don't forget to uncomment the gpgcheck line again after installing the packages.
[edit]
Check java version

[localhost i586]$ java -version
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
[localhost i586]$

[edit]
Firefox plugin

If you've installed java-1.5.0-sun-plugin and you want to use it with firefox, you'll need to set up the link manually as there is a small bug in the java-1.5.0-sun-plugin package that causes it not to set up the link properly for the FC4 firefox package.

[localhost i586]$ cd /usr/lib/firefox-1.0.7/plugins
[localhost plugins]$ sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.05/jre/plugin/i386/ns7/libjavaplugin_oji.so .

Alternatively, you could just put the link in /usr/lib/mozilla/plugins, which should work for both mozilla and firefox, and should keep working if the browsers are updated.

[localhost i586]$ cd /usr/lib/mozilla/plugins
[localhost plugins]$ sudo rm -f libjavaplugin_oji.so
[localhost plugins]$ sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.05/jre/plugin/i386/ns7/libjavaplugin_oji.so .

Removing any existing libjavaplugin_oji.so link should only be necessary if you've previously installed a different version of java.
[edit]
Switching between java implementations

The JPackage java RPMs support switching between java implementations using the "alternatives" system.

[localhost ~]$ sudo /usr/sbin/alternatives --config java

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/share/java/libgcj-java-placeholder.sh
2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java

Enter to keep the current selection[+], or type selection number: 2
[localhost ~]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.0.0 20050519 (Red Hat 4.0.0-8)

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[localhost ~]$ sudo /usr/sbin/alternatives --auto java
[localhost ~]$ java -version
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
 
Old 01-09-2006, 08:47 PM   #7
dimsh
Member
 
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
jun_tuko: you have already made a great detailed Howto, I appreciate your work, you may consider adding it to this site's How to page.

good job.

Regards
 
Old 01-10-2006, 02:34 AM   #8
randell6564
Member
 
Registered: Nov 2005
Location: California USA
Distribution: Ubuntu,(Feisty Fawn) Windows XP(Home Edition)
Posts: 634

Rep: Reputation: 31
Im am completely Lost!!

I seem to be haveing the same problem with getting java installed.
I guess one reason is that I followed 'Sun's' directions!
This is what I get from the terminal:

[root@localhost ~]# cd /usr/java
[root@localhost java]# chmod a+x jre-1_5_0-linux-i586-rpm.bin chmod: cannot access `jre-1_5_0-linux-i586-rpm.bin': No such file or directory
[root@localhost java]# ./jre-1_5_0-linux-i586-rpm.bin
bash: ./jre-1_5_0-linux-i586-rpm.bin: No such file or directory
[root@localhost java]#


I downloaded the rpm self-extractor to the desktop, moved it to /usr/java. Now let me be a little clearer...the thing that i downloaded identifies its self as a "shell script" in its properties. does this sound right? anyway, I moved it to /usr/java as I said preveously and thats where im at at this point.

One more question...please do not get me wrong, I enjoy useing linux although it frustrates me more than anything, I am all for thew idea of "open source". I really want to learn how to use it better so that i can some day trash my microsoft disks! My question is this...Why in the heck is there not a self-executable file that after downloading and clicking on it installs automatically!!!?? IS this because there are so many different linux systems?
 
Old 01-10-2006, 03:54 AM   #9
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Yor best bet is to download the java self extracting file, from Here, not the RPM version.

Follow the instructions on the sun website, or the ones that I wrote. You just need to make /usr/local/java, copy the file that you downloaded there, and run it (all as root). There are also instructions on my website (link above) on how to set up your PATH and JAVA_HOME environment variables, and installing the firefox plugin.

I hope this helps
--Ian
 
Old 01-10-2006, 04:36 AM   #10
randell6564
Member
 
Registered: Nov 2005
Location: California USA
Distribution: Ubuntu,(Feisty Fawn) Windows XP(Home Edition)
Posts: 634

Rep: Reputation: 31
Thank you! Ill keep ya posted!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java & Fedora Core 4 Rick069 Linux - Software 6 09-22-2005 04:49 AM
Fedora Core 4 refuses to make grub work adamb10 Fedora 1 06-14-2005 07:23 AM
Getting Java-VM to work on Fedora Core 2 rpierce34 Fedora 13 03-31-2005 11:33 PM
Java SDK and Fedora Core 3 caps_phisto Fedora 5 01-12-2005 03:02 PM
Java installation on Fedora Core mfwlinuxhome Linux - Newbie 25 05-10-2004 12:03 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration