TuxPPC
TuxPPC
home   |   submit: news, guide,   |   volunteer   |     |  


Sponsored by
Sponsored by PowerMax.com

Buy iMac


News Editions

About iMac

About Linux

Getting Started

Getting Help

User Resources

Advertisement

Distributions

Software Picks






Search

 

Links
  iMacLinux Edition Tuesday, 17 June 2003  



Posted by on Monday February 04th, 2002 10:00:00 AM
Using Java in your PPC Linux browser (Mozilla or Konqueror) is not very difficult, yet one has to know how to do it and unfortunately, documentation on the subject is sparse. That's why I hope this small HowTo will be able to help people get it working.

We will use 3 steps, installing the right Java VM, configuring Konqueror and configuring Mozilla.

1) Installing the Java VM

Unfortunately, the Java VM I have seen included with recent PPC distributions seem either to be not working or too old (notably SuSE 7.3 and YDL 2.1). So we will have to install the VM manually. In order for Java to work within Konqueror or Mozilla, we need a Java2 VM, we have the choice between IBM's JRE and Sun's Blackdown Java2 JRE. Note that we will only install the JRE (Java Runtime Environment) and not the whole SDK. IBM's VM seems to be buggy on PPC, because all I could get was "Out of memory" messages. That's why I decided to stick with the Sun Blackdown VM.

You can download the latest PPC version of it at a mirror from:

Click onto one of the mirrors and download the file JDK-1.3.1/ppc/FCS-02a/j2re-1.3.1-02a-FCS-linux-ppc.bin

Once downloaded, as root, move the .bin file to /usr/lib and do a "chmod a+x j2re-1.3.1-02a-FCS-linux-ppc.bin". Then run the binary installer file (type ./j2re-1.3.1-02a-FCS-linux-ppc.bin) and it will uncompress the Java VM into a new directory.

Now edit the .profile files in the home directory of each user that might use the Java VM, to add /usr/lib/j2re1.3.1/bin/ to the user's $PATH variable.

It may be preferable to remove any other Java VM installed, or at least remove it's java executable from the PATH. (Although normally, they should not interfere)

2) Using Java in Konqueror

Open up an instance of Konqueror. This HowTo applies to Konqueror 2.1 or later. Select "Configure Konqueror..." from the "Settings" menu. Then click onto "Konqueror Browser" in the sidebar and click onto the "Java" tab. Make sure the "Enable Java globally" and "Use Security Manager" check boxes are checked. You may also want to enable the Java console to trouble shoot applets.

Finally, set the "Path to java executable" to "/usr/lib/j2re1.3.1/bin/java".

Close Konqueror and relaunch it. Java should be working now. Note that it may take a few moments till a Java applet actually shows up on a web site, as the applet has to be downloaded and the VM has to be started...

3) Using Java in Mozilla

According to some user reports, Java support is broken on PPC on recent Mozilla versions. However, it seems to work fine on the popular 0.9.4 Mozilla release, so I suggest using that one, if it won't work with your version.

Getting Java to work in Mozilla is the simple matter of creating a link. First cd to your mozilla plugin directory (cd /opt/mozilla/plugins for me, may be different on your system, type "locate mozilla/plugins" to find out where it is).

Now simply create a link to the mozilla plugin included with the Blackdown VM by typing "ln -s /usr/lib/j2re1.3.1/plugin/ppc/mozilla/javaplugin_oji.so ./". Note that you HAVE to do a link, copying the plugin won't work.

Close all Mozilla instances and relaunch it. Java should be working now. Note that it may take a few moments till a Java applet actually shows up on a web site, as the applet has to be downloaded and the VM has to be started...

If you have any problems, comments or suggestions, feel free to .

Search for mozilla

The Fine Print: The following comments are owned by whoever posted them.
(Reply)

by barry on Monday February 04th, 2002 02:27:34 PM
I just spent quite a bit of time with this and found that, in the end, the Release Notes for your particular version of Mozilla should be the safest and quickest direction. Here's how the 0.9.6 release (packaged with Ximian Desktop for Yellow Dog 2.1) is different, as an example: Make a soft link from /plugins/libjavaplugin_oji.so to /usr/java/j*/jre/plugins/i386/ns600/libjavaplugin_oji.so Of course the ppc version will have a different path than that given in the example, but it's the "lib" prefix on the javaplugin_oji.so that's different in this release. It's too easy to waste time spinning your wheels on this task yet very hard to contemplate surfing the Web without java!
by stimuli on Tuesday February 05th, 2002 02:37:37 AM
You're both incorrect! ;) To enable Java in Mozilla/Galeon,
  • ln -s /usr/lib/jre/lib/ppc/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

  • This works w/ j2re 1.3.X and recent mozillas.For instance, I am using j2re-1.3.0-2a and Mozilla 0.9.7 and Galeon 1.0.2 .
    Hope this helps!
by on Tuesday February 05th, 2002 08:34:54 AM
Kevyn Shortell has written a nice small script to automagically download and install the JRE and do proper linking for mozilla. You can find his page . Thanks, Trance ;)
by on Tuesday March 26th, 2002 01:39:17 PM

Just for grins, comply with the FSSTND and install in /opt - e.g. /opt/java. Personally, I have a profile script that adds /opt/*/bin to PATH and /opt/*/lib to LD_LIBRARY_PATH. (Just be sure that root owns /opt!)


  Legal and Privacy Notices Copyright © 2001