LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-10-2005, 02:33 PM   #1
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Rep: Reputation: 15
install java!!


Hi,

I can't get Java to work.
I tried the following with both JRE 1.5 and JDK 1.5.
I'll explain with JDK since this is the one I want at the end.
I'm a Linux newbie, i hope I can get some help.

I got most of those instructions from
http://stanton-finley.net/fedora_cor...otes.html#Java

First I downloaded jdk-1_5_0_04-linux-i586.bin
("Fedora Core 4 users are advised not to use the Java RPM provided by Sun.")
, saved it under /opt.
As a root, I did a chmod +x on the file, then a ./*.bin
Agreed to the license. The instalation went fine without any error message.
I did the following command:

ln -s /opt/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

I did this command several times with variations. One "firefox-1.0.6" instead of "mozilla", and one with "jdk1.5.0_04/jre" instead of "jre1.5.0_04".
The 4 of them went fine with no error.
(I didn't do all of them at once, I did one, test it, tried the other one...)

Now came the time for testing
I went on http://www.java.com/en/download/help/testvm.xml to test the virtual machine. At first the good sign was that Firefox was not asking for a missing plugin anymore. But actually nothing appeared at the place where the Java Test box was supposed to be. Tried it many times, even reboot the computer...

I also tried the samples given in the package (demo/applets.html).
It didn't work.

I guess I could stop here, and ask for help.

Also, I tried something else.
I went in the folder where Clock.class is, and I tried to do a "appletviewer Clock.class".
It said 'bash appletviewer command not found".
I also tried the same thing but by going in the folder where the file "appletviewer" is. Even though the file was in front of me, it said "command not found".
I thought that if I was in the same folder of an application, there wouldn't be any problem when calling its name. Was I wrong?

Please help!

Thanks,

Nathan

Last edited by nasht; 08-10-2005 at 02:34 PM.
 
Old 08-10-2005, 02:49 PM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Try changing your symlinc from this:
ln -s /opt/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

To This:
ln -s /opt/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

first varifiying that your path to "libjavaplugin_oji.so" is correct... You don't have to reboot the computer just re-start Mozilla/Firefox, then type in the url "aboutlugins" and you will know if it took right away...

KC
 
Old 08-10-2005, 03:05 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
For your "command not found" problem, it sounds like you need to add the path to your jdk1.5.0_04/bin to your PATH environment variable:

$ EXPORT PATH=$PATH:/path/to/jre1.5.0_04/bin
 
Old 08-10-2005, 03:34 PM   #4
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kencaz
[B]Try changing your symlinc from this:
ln -s /opt/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

To This:
ln -s /opt/jre1.5.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
nope, it said "file exists", which I guess means that I typed it right no?
 
Old 08-10-2005, 03:38 PM   #5
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 245

Rep: Reputation: 30
Either that or you can create symlinks to the java executables (java, javac, appletviewer, etc) and place the symlinks in your /usr/local/bin directory, or anywhere that's already in your path environment variable. That way anyone who logs onto you machine can use java and you don't have to muck around with exporting environment variables and making sure they're set on next boot-up.

If you were in the directory where appletviewer reside and still got the "Command not found" message I'd check you have execute permissions to the file.

Have you tried starting firefox from the console to see if it outputs any error messages when you try to run an applet?
 
Old 08-10-2005, 03:43 PM   #6
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Try:
ls -l /usr/lib/mozilla/plugins/

see of the symlinc is there and pointing to the correct folder...

Example:
lrwxrwxrwx 1 root root 58 Jul 23 11:00 libjavaplugin_oji.so -> /usr/java/jre1.5.0_02/plugin/i386/ns7/libjavaplugin_oji.so*

KC
 
Old 08-10-2005, 03:44 PM   #7
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Nylex
$ EXPORT PATH=$PATH:/path/to/jre1.5.0_04/bin
First I got bash: $: command not found
I took out the $, I got
bash: EXPORT: command not found
I took out the space between $ and EXPORT, I got:
[root@localhost bin]# $EXPORT PATH=$PATH:/opt/jdk1.5.0_04/bin
bash: PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/nute/bin:/opt/jdk1.5.0_04/bin

I am sure that /opt/jdk1.5.0_04/bin DOES exist and that's where my bins are.

Then when typing echo $PATH, I got
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/nute/bin
Which I guess means that it was not added..

EDIT: I meant /opt/jdk1.5.0_04/bin (changed it)

Last edited by nasht; 08-10-2005 at 03:45 PM.
 
Old 08-10-2005, 03:47 PM   #8
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mickyg
If you were in the directory where appletviewer reside and still got the "Command not found" message I'd check you have execute permissions to the file.

Have you tried starting firefox from the console to see if it outputs any error messages when you try to run an applet?
Permissions are 755.

I tried firefox from commadn line, no errors.

NEVERMIND, I did have some errors, starting with:

java.lang.UnsatisfiedLinkError: /opt/jdk1.5.0_04/jre/lib/i386/libdeploy.so: /opt/jdk1.5.0_04/jre/lib/i386/libdeploy.so: cannot restore segment prot after reloc: Permission denied

Last edited by nasht; 08-10-2005 at 03:49 PM.
 
Old 08-10-2005, 03:51 PM   #9
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kencaz
Try:
ls -l /usr/lib/mozilla/plugins/
Result:
lrwxrwxrwx 1 root root 57 Aug 10 12:17 libjavaplugin_oji.so -> /opt/jdk1.5.0_04/jre/plugin/i386/ns7/libjavaplugin_oji.so
 
Old 08-10-2005, 04:19 PM   #10
nasht
LQ Newbie
 
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Nylex
$ EXPORT PATH=$PATH:/path/to/jre1.5.0_04/bin
After other trials, I did
[root@localhost bin]# export PATH=$PATH:/opt/jdk1.5.0_04/bin
(lower care export)

It now fixed the "command not found" problem.
Now ehen I type: appletviewer Clock.class , i have no error message but nothing happens, nothing opens.
 
Old 08-30-2005, 01:13 PM   #11
mah77
LQ Newbie
 
Registered: Aug 2005
Posts: 1

Rep: Reputation: 0
Hello,

I have the same problem :-( ... I installed Firefox 1.0.6. and also installed the java plugin as described on java.com. For the first time it worked, but now it does not work anymore! I don't know what happend, because I did not make any changes at all :-( I don't understand it. Did you solve your problem already? I tried to uninstall and install it again, but it did not help :-(
 
Old 09-01-2005, 01:38 AM   #12
smfinley
LQ Newbie
 
Registered: Jun 2004
Posts: 13

Rep: Reputation: 0
Did you try updating your system including your kernel with "yum update" as root and then rebooting?
 
Old 09-01-2005, 09:27 AM   #13
JohnFNYC
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
I had the same problem. I believe when the Fedora folks advise not to use the Sun RPM, they really are suggesting not to use the Sun JVM/JRE. Instead, I was successful in using the Blackdown Java Runtime Environment.

You can get it at: http://www.blackdown.org/
 
Old 09-01-2005, 11:23 AM   #14
smfinley
LQ Newbie
 
Registered: Jun 2004
Posts: 13

Rep: Reputation: 0
Quote:
Originally posted by JohnFNYC
[B]I had the same problem. I believe when the Fedora folks advise not to use the Sun RPM, they really are suggesting not to use the Sun JVM/JRE...
This is absolutely not true. Section "6.1.8. Java Package Recommendations" in the official Fedora Core 4 Release Notes state that " 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."

To install the Sun Java .bin file (the suggested tarball) into /opt as recommended see the Java section in Fedora Core 4 Linux Installation Notes.
 
Old 09-01-2005, 12:33 PM   #15
JohnFNYC
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
Thank you for the pointer to the additional documentation. I stand corrected; apparently the Fedora folks are indeed recommending using the latest Sun JRE.

I retried the installation, this time putting it in /opt (as recommended by the Fedora folks) rather than /usr/java (as recommended by Sun). It failed in the same way.

The "jpackage.org" site has an apparently defective RPM file, 15K in size.

I'm back to Blackdown. Working fine. No stability issues to report so far. Let me know if it works for you.

Last edited by JohnFNYC; 09-01-2005 at 12:34 PM.
 
  


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 does not install in opt but install in usr bbmak Linux - Software 6 10-02-2005 11:13 PM
what directory is java install? what CMD determined where java is install? Thks. suse2166 Linux - Newbie 2 09-04-2005 08:24 PM
why can't i install Java , please help waheedrafiq Linux - Software 11 12-03-2003 01:10 PM
how to install java? Txlyo Red Hat 2 11-06-2003 10:16 AM
Java install doralsoral Linux - Software 10 09-19-2003 10:53 AM


All times are GMT -5. The time now is 05:03 PM.

Main Menu
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