Ensode.net
Google
 

Home
Blog
Guides
Tips
Articles
Utilities
Reviews
About Us
Contact us


Facebook profile

XML

HOWTO: Setting up OpenOffice.org 2.0 With Sun Java on Fedora 64
Bookmark and Share

Fedora Core 4 64 bit comes with GCJ as its default Java Runtime Environment. Unfortunately OpenOffice.org 2.0 beta does not work very well with GCJ. For example, the OpenOffice.org Base component crashes when starting up because it tries to use GCJ for its Java functionality.

To be able to use Sun's Java Runtime Environment (JRE) with OpenOffice.org, the 32 version of Sun's JRE must be installed. For technical reasons beyond the scope of this article, the version of OpenOffice.org included with Fedora 64 is 32 bit and it does not work with the 64 bit Sun JRE.

Downloading And Installing the 32 bit JRE

Download the latest 32 bit Java Runtime Environment for Linux from Sun's Java web site here. The file needed is the one labeled Linux (self-extracting file). You should now have a file named something like jre-1_5_0_04-linux-i586.bin, the exact name will depend on the version of the JRE. Once downloaded, copy it to a suitable location (a good location would be /opt/java32. Next, make it executable by issuing the following command as root: chmod 755 jre-1_5_0_04-linux-i586.bin. Next, execute the file by issuing the following command from the directory where the file was copied: ./jre-1_5_0_04-linux-i586.bin, accept the terms by typing yes and hitting enter, the file should now self-extract its contents. The 32 version of Sun's Java Runtime Environment is now installed.

Setting up OpenOffice.org to use Sun's Java

Open any OpenOffice.org component, we will use Writer to illustrate the steps, any of the other components (except base, which will most likely crash) will do. Start Writer by going to Applications->Office->OpenOffice.org Writer, once Writer is up, go to Tools->Options->Java, wait a while while OpenOffice.org scans your hard drive for existing Java installations. Once it is done you will see a list of the Java Runtime Environments it found on your systems, more than likely it will only find one, with a with a vendor label of Free Software Foundation, Inc.. Next, click on the "Add..." button, navigate to the location where Sun's 32 bit JRE was installed (/opt/java32 was used as an example above), click on the jre1.5.0_04 directory (exact directory name will depend based on the version of the JRE that was downloaded). Make sure the radio button for the newly added JRE is selected (should be by default) and click the "OK" button at the bottom. You should get a warning window stating that OpenOffice.org must be restarted for the changes to take place, go ahead and let it restart. OpenOffice.org should now be using Sun's JRE.

Resources


Java EE 6 Development With NetBeans 7
Java EE 6 Development With NetBeans 7


Java EE 6 with GlassFish 3 Application Server
Java EE 6 with GlassFish 3 Application Server


JasperReports 3.5 For Java Developers
JasperReports 3.5 For Java Developers