PDA

View Full Version : I need Java on my Linux box



carlwill
10th November 2004, 08:36 AM
Can someone please tell me what the best way to download and install Java on my machine?

I tried for several months and became frustrated and gave up. Now I am getting ready to pick up the slack again :eek:

Thanks for any help.

wiraone
10th November 2004, 08:47 AM
http://www.java.com/en/download/linux_manual.jsp and download the RPM ..

imdeemvp
10th November 2004, 09:27 AM
For our most common needs the answers are located at the Fedora FAQ and here is java (http://www.fedorafaq.org/#installsoftware)

jayemef
10th November 2004, 05:13 PM
For our most common needs the answers are located at the Fedora FAQ and here is java
Werrd. And here is the direct link to the java installation section: http://www.fedorafaq.org/#java .

taylor65
10th November 2004, 06:14 PM
I always just do 'yum install mozilla-j2re'. Worked with FC1 and FC2. Haven't tried it with FC3 yet.

crackers
10th November 2004, 07:14 PM
Note that there is a very large difference between the JRE (which taylor65 refers to) and the SDK (which is the full-blown development kit). If you're not going to be developing Java applications, install the JRE. I've always preferred the Sun "tarball," but I do use the full SDK since I am a Java developer... ;)

carlwill
10th November 2004, 07:22 PM
Cracker

So what you are trying to say is if I just want the Java plugin and nothing else like dev tools, just run


yum install mozilla-j2re

I notice the command includes the "mozilla" but does that matter if I only use Firefox and removed Mozilla from my machine?

I just need Java to use Limewire P2P network and join some Java based live chat forums :)

carlwill
10th November 2004, 07:28 PM
Guys:

I did the following command


[root@carlwill carlos]# yum install mozilla-j2re

and this is what it said:

I will do the following:
[install: mozilla-j2re 1.4.2-9.1.fc2.dag.i586]
I will install/upgrade these to satisfy the dependencies:
[deps: j2re 1.4.2-8.1.fc2.dag.i586]
Is this ok [y/N]: y
Downloading Packages
Getting mozilla-j2re-1.4.2-9.1.fc2.dag.i586.rpm
mozilla-j2re-1.4.2-9.1.fc 100% |=========================| 199 kB 00:00
Getting j2re-1.4.2-8.1.fc2.dag.i586.rpm
j2re-1.4.2-8.1.fc2.dag.i5 100% |=========================| 19 MB 00:56
Running test transaction:
Test transaction complete, Success!
j2re 100 % done 1/2
mozilla-j2re 100 % done 2/2
Installed: mozilla-j2re 1.4.2-9.1.fc2.dag.i586
Dep Installed: j2re 1.4.2-8.1.fc2.dag.i586
Transaction(s) Complete

I tried going to companies website that requires Java and I get a plugin error :confused:

Pegasus
11th November 2004, 03:38 PM
Java-Installation for Fedora Core with FireFox/Mozilla browser:

1. Download JRE 1.5.0 from Sun : http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jre-1.5.0-oth-JPR&SiteId=JSC&TransactionId=noreg
2. open terminal with root access and install:


# chmod a+x jre-1_5_0-linux-i586-rpm.bin
# ./jre-1_5_0-linux-i586-rpm.bin
(licence agreement will appear. choose "yes" to continue)

Java is now installed in /usr/java/jre1.5.0
3. create the symlink for your browser: ln -s /usr/java/jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so /home/pegasus/.mozilla/plugins/libjavaplugin_oji.so
(exchange "pegasus" with correct username)
4. Test the plugin: open browser-site "about: plugins" ... java should be listed now
5. Open this Page: http://www.java.com/en/download/linux_manual.jsp ... wait a few seconds ... if it switches to "Java Software Installed"-Congrats Page, jave is working i a correct way ;)

sideways
11th November 2004, 03:56 PM
Just a few points to get jre-1.5 working on FC3

Download jre-1_5_0-linux-i586-rpm.bin from the link in Pegusus' post above

login as root

su -

execute the script

sh jre-1_5_0-linux-i586-rpm.bin

create the symbolic link for the plugin as follows

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

logout of the desktop and log back in.

Unfortunately java web start seems to be broken in FC3 (javaws just hangs)
a temporary fix is as follows (from this thread (http://www.fedoraforum.org/forum/showthread.php?t=26423))

download this version of javaws http://www.jbg.f2s.com/javaws-1_2_0_06-linux-i586-i.zip
unzip and run install.sh from a suitable directory. This creates a separate javaws executable which works fine (you may need to edit the file type action for JNLP file types in Firefox Edit->Preferences->Downloads)
You can test java web start apps are working at this page http://java.sun.com/products/javawebstart/demos.html

carlwill
13th November 2004, 07:33 PM
Java-Installation for Fedora Core with FireFox/Mozilla browser:

1. Download JRE 1.5.0 from Sun : http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jre-1.5.0-oth-JPR&SiteId=JSC&TransactionId=noreg


Pegasus, I am following your steps but I don't know which one I need?

Linux RPM in self-extracting file (jre-1_5_0-linux-i586-rpm.bin, 15.24 MB)
Linux self-extracting file (jre-1_5_0-linux-i586.bin, 15.75 MB)


:confused:

crackers
13th November 2004, 07:52 PM
Get the one that has "rpm" in it, just like sideways says.

carlwill
13th November 2004, 08:53 PM
Ok, I followed sideways steps

Downloaded the RPM

executed the script.

Now I get this when I finish up his steps...?


[root@carlwill root]# cd /usr/lib/mozilla/plugins
[root@carlwill plugins]# ln -s /usr/java/jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so
ln: `./libjavaplugin_oji.so': File exists

sideways
13th November 2004, 09:02 PM
cd /usr/lib/mozilla/plugins
rm libjavaplugin_oji.so
ln -s /usr/java/jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so

logout of the desktop and log back in

if it still doesn't work pm me

carlwill
13th November 2004, 11:24 PM
PM'd you and I don't know if it matters but the URL I goto requires Sun Java J2SE50 :confused:

Is that not what I downloaded?

taylor65
14th November 2004, 01:13 AM
I installed java on FC3 like this:

1 - add dag repository to yum by copying the following 5 lines into the file /etc/yum.repos.d/dag.repo:
[dag]
name=Dag
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/
enabled=1
gpgcheck=0
2 - Install gpg keys for dag (rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt)
3 - Install synaptic (yum install synaptic)
4 - Run synaptic (System Settings -> Synaptic Package Manager)
5 - Click Refresh
6 - Click Find and look for j2re
7 - Mark mozilla-j2re for installation (right-click -> Mark for Installation)
8 - Click Apply
9 - Done. Mozilla and Firefox now have java.
10 - Do the same for flash and anything else you want to install

sideways
14th November 2004, 01:35 AM
PM'd you and I don't know if it matters but the URL I goto requires Sun Java J2SE50 :confused:

Is that not what I downloaded?

Ok, the faq will be up soon, wait for that. :)

carlwill
14th November 2004, 04:31 AM
The FAQ? I guess I am lost. I thought we were trying to install Java on my FC2 box and I already looked at the Fedora FAQ and that does not help.

I think I am just going to be Java-less :(

crackers
14th November 2004, 08:15 AM
Have you tried reading the instructions at http://java.sun.com?

carlwill
14th November 2004, 08:17 PM
Come on guys - I am not being lazy. I have tried reading everything from Java to Fedora FAQ and I think I am either doing some thing wrong or just having an error.

Thanks for your help

crackers
14th November 2004, 10:51 PM
Okay, just start over fresh. Remove both installations of java using RPM. Go to the plugins directory and remove ANY file or link that has "java" in it.

Next, make sure the downloaded JRE you got from Sun matches the MD5 they've published, and make sure it's either versioned as 1.5 or 5 (basically the same thing). Install that RPM. Then do the "ln -s" as described above if one was not installed for you (which it shouldn't, I think).

Note: in my Java 5 install (from tarball), the plugin is quite a bit different - there's two directories, one for "ns7" and one for "ns7-gcc29." This is a reversal from previous versions where you had to pick between "ns610" and "ns610-gcc32." For FC2 and newer, it would seem that you need to use the "ns7" version - the GCC2.9 is obviously provided for backwards compatibility on older systems.

If you're trying to use something that utilized JavaWebStart and requires Java 5, you may not be able to invoke it through the plugin. If that's the case, you can always try "/path/to/java/javaws/javaws http://...." where the URL is the full URL to the .jnlp file.

SharedMedia
17th November 2004, 07:18 PM
Java 2 Platform, Standard Edition (J2SE/J2RE/SDK)

Fedora Team,
Reviewing the Java threads, I too am confused (slightly). Would the FC Team be able to include your comments on what Java Files are required in FC3 to compile / run applications. (So newbies don't install incorrect rpms in FC3). My Suggestions; If you are planning to write code in the Java programming language (and I beleive to compile), you'll need the full Java 2 Software Development Kit, Standard Edition (J2SE SDK), formerly known as the Java Development Kit (JDK). This download also includes the JRE. What I'll do is review and compile an FC3 RPM if needed then post, however my result end up, I will post my findings when installing Java on FC3.

LINK to Sun's LINUX Page (http://java.sun.com/linux/index.html)

Sun Announces Java 2 Platform Standard Edition 5.0 Available.. LINK (http://java.sun.com/j2se/1.5.0/index.jsp)

LINK to JDK5 bin.rpm (http://neo.caslab.queensu.ca/~bhall/)