Difference between revisions of "Java and OpenOffice.org"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Automagically converted by twiki2mediawiki)
 
m (All: use Bug template)
 
(22 intermediate revisions by 14 users not shown)
Line 1: Line 1:
 +
'''Java''' is required for complete [[OpenOffice.org]] functionality. Java is mainly required to use the new embedded Java technology based [[wikipedia:HSQLDB|HSQLDB]] database engine, or to make use of accessibility and assistive technologies. If you do not require database tables or accessibility integration or some wizards, then you do not need to download and install Java. [[Base]] (the database component) for example completely relies on Java technologies to run, but other programs (like [[Writer]], [[Calc]], and [[Impress]]) only need Java for special functionality (see below).
  
 +
If you already have Java installed there is no need to download the OpenOffice.org installer with Java.
  
 +
If you choose not to download Java you can easily install Java afterwards to get the missing functionality to work.
  
=== [[Main_OpenOffice|OpenOffice]].org 2.0 Functionality depending on Java===
+
The Java Runtime Environment (JRE) or complete Java Development Kit (JDK) can be downloaded from [http://java.com/ java.com].
  
for use Java in [[Main_OpenOffice|OpenOffice]].org, please see
+
Some aspects of Java in OpenOffice.org are platform-specific. See the [[Documentation/FAQ/Platform|Platform FAQs]]. For installing Java on Windows machines, one might appreciate: [http://www.java.com/en/download/help/5000010400.xml Download Instructions for Windows offline].  Mac_OS_X_10.5 comes with Java pre-installed; there is nothing to download. However, OpenOffice 2.3 doesn't work with Java on Mac OS 10.5; you need OpenOffice 2.4. See the [[Documentation/FAQ/Platform/Mac_OS_X_10.5|Mac_OS_X_10.5 FAQs]].
  
* Policies : http://tools.openoffice.org/policies/java_usage.html
+
== OpenOffice.org Functionality depending on Java ==
  
==== [[Main_OpenOffice|OpenOffice]].org Base====
+
For the policy for Java use in OpenOffice.org, please see
 +
 
 +
* [http://tools.openoffice.org/policies/java_usage.html Policy for the usage of Java in the OpenOffice.org project]
 +
 
 +
=== OpenOffice.org [[Base]] ===
  
 
* Create Form Wizard
 
* Create Form Wizard
  
==== [[Main_OpenOffice|OpenOffice]].org Writer====
+
=== OpenOffice.org [[Writer]] ===
  
 
* Letter Wizard
 
* Letter Wizard
Line 19: Line 26:
 
* HTML Wizard
 
* HTML Wizard
  
* [[Main_SaveAs|SaveAs]] -> [[Main_AportisDoc|AportisDoc]] (Palm)
+
* SaveAs -> AportisDoc (Palm)
* [[Main_SaveAs|SaveAs]] -> [[Main_DocBook|DocBook]]
+
* SaveAs -> DocBook
* [[Main_SaveAs|SaveAs]] -> Pocket Word (*.psw)
+
* SaveAs -> Pocket Word (*.psw)
  
==== [[Main_OpenOffice|OpenOffice]].org Calc====
+
=== OpenOffice.org [[Calc]] ===
  
* [[Main_SaveAs|SaveAs]] -> Pocket Excel
+
* SaveAs -> Pocket Excel
  
==== All====
+
=== OpenOffice.org [[Extensions]] ===
  
* [[Main_OfficeBean|OfficeBean]]
+
* [http://extensions.services.openoffice.org/project/wikipublisher Wiki Publisher]
* Java Script Macros
+
* [http://extensions.services.openoffice.org/project/reportdesign Report Builder]
* Beanshell Macros
+
* Python ???
+
  
Question: What is exactly not working ? Tools->Organzie Macros->[[[Main_JavaScript|JavaScript]]|Beanshell|Python] pops up a message boxes that no JRE is installed but then the Dialog is displayed (please also see http://www.openoffice.org/issues/show_bug.cgi?id=46680)
+
=== All ===
  
 +
* [[OOoBean]]
 +
* [[JavaScript Macros]]
 +
* [[Beanshell Macros]]
  
=== Java detection in [[Main_StarOffice|StarOffice]] 8 and [[Main_OpenOffice|OpenOffice]].org 2===
 
  
 +
Question: What is exactly not working ? Tools->Macros->Organize Macros -> JavaScript|Beanshell|Python pops up a message boxes that no JRE is installed but then the Dialog is displayed (see {{Bug|37020}}).
  
==== Which Java will be used ?====
+
== Java detection in OpenOffice.org 2 and [[StarOffice]] 8 ==
  
[[Main_StarOffice|StarOffice]] tries to detect the newest Java version installed.
+
=== Which Java will be used? ===
[[Main_StarOffice|StarOffice]] only detects Sun Java versions, while [[Main_OpenOffice|OpenOffice]].org also
+
detects Java versions from other vendors.
+
When using versions from different vendors, the numbering system might
+
be different so maybe not the newest version is used.
+
You can change the Java version in [[Main_StarOffice|StarOffice]] via tools/options/Java.
+
On GNOME, if AT tool support is enabled, [[Main_StarOffice|StarOffice]] will use that latest
+
version where the Java Access Bridge is enabled.
+
  
====  When is Java detection done ?====
+
[[StarOffice]] tries to detect the newest Java version installed. [[StarOffice]] only detects Sun Java versions, while OpenOffice.org also detects Java versions from other vendors.
  
On Windows, detection is done the first time Java is used.
+
When using versions from different vendors, the numbering system might be different so maybe not the newest version is used. You can change the Java version in [[StarOffice]] via tools/options/Java.
On Linux/Solaris, detection is done the first time a user starts [[Main_StarOffice|StarOffice]].
+
  
==== How can I reset the Java configuration ?====
+
On [[GNOME]], if AT tool support is enabled, [[StarOffice]] will use that latest version where the [[Java Access Bridge]] is enabled.
  
The configuration is stored in
+
=== When is Java detection done? ===
  
< staroffice-config > /user/config/javasettings_ < platform > .xml.
+
On Windows, detection is done the first time Java is used. On Linux/Solaris, detection is done the first time a user starts [[StarOffice]].
  
Just delete this file if you want [[Main_StarOffice|StarOffice]] to detect again.
+
=== How do I see the System.out.println output of Java components in OpenOffice.org? ===
 +
 
 +
You'll find some suggestions here :
 +
 
 +
http://www.oooforum.org/forum/viewtopic.phtml?t=66121
 +
 
 +
Does any one know the real answer?
 +
 
 +
=== How do I debug Java components in OpenOffice.org? ===
 +
 
 +
You must go to Tools.Options.OpenOffice.org.Java, and click 'Parameters' for your chosen JVM. This allows you to pass options into the JVM when it is initialised. At a minimum you will need something similar to:
 +
 
 +
-Xdebug<br>
 +
-Xnoagent<br>
 +
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
 +
 
 +
Note that when you are running a JVM with 'suspend=y' and you attempt to register a Java component, it will hang waiting for you to connect a debugger. In this case, you need to close down Office, change the configuration back, register the component, then re-start office, add in the JVM parameters, then call the Java component again. To speed this process up a bit, you can edit the java settings file contained in your user config directory, which on windows will be something like:
 +
 
 +
C:\Documents and Settings\<windows username>\Application Data\OpenOffice.org2\user\config\java_settings_Windows_x86.xml
 +
 
 +
It contains an element called 'vmParameters'. When you have java debugging enabled it will look something like:
 +
 
 +
<vmParameters xsi:nil="false">
 +
<param>-Xdebug</param>
 +
<param>-Xnoagent</param>
 +
<param>-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</param>
 +
</vmParameters>
 +
 
 +
If you are not running with debug it will contain:
 +
<vmParameters xsi:nil="false"/>
 +
 
 +
It is a little bit quicker to manually edit this file between restarts then to use the UI.
 +
 
 +
=== How can I reset the Java configuration? ===
 +
 
 +
The configuration is stored in
 +
 
 +
< staroffice-config > /user/config/javasettings_ < platform > .xml
 +
 
 +
Just delete this file if you want [[StarOffice]] to detect again.
 
The Java configuration file cannot be modified manually. The data format
 
The Java configuration file cannot be modified manually. The data format
is not specified an may change anytime without further notice.
+
is not specified and may change anytime without further notice.
 
Don't try to modify that file to change the Java version. The < location >
 
Don't try to modify that file to change the Java version. The < location >
 
and < version > entries are only for 'documentation', the Java version is
 
and < version > entries are only for 'documentation', the Java version is
 
accessed via the < vendorData > , which is binary.
 
accessed via the < vendorData > , which is binary.
  
 +
== External links ==
 +
 +
* [http://en.wikipedia.org/wiki/OpenOffice.org#Java_controversy Wikipedia: OpenOffice.org Java controversy]
 +
* http://download.openoffice.org/2.1.0/java.html (intro source)
  
 +
[[Category:Java]]

Latest revision as of 22:00, 9 November 2011

Java is required for complete OpenOffice.org functionality. Java is mainly required to use the new embedded Java technology based HSQLDB database engine, or to make use of accessibility and assistive technologies. If you do not require database tables or accessibility integration or some wizards, then you do not need to download and install Java. Base (the database component) for example completely relies on Java technologies to run, but other programs (like Writer, Calc, and Impress) only need Java for special functionality (see below).

If you already have Java installed there is no need to download the OpenOffice.org installer with Java.

If you choose not to download Java you can easily install Java afterwards to get the missing functionality to work.

The Java Runtime Environment (JRE) or complete Java Development Kit (JDK) can be downloaded from java.com.

Some aspects of Java in OpenOffice.org are platform-specific. See the Platform FAQs. For installing Java on Windows machines, one might appreciate: Download Instructions for Windows offline. Mac_OS_X_10.5 comes with Java pre-installed; there is nothing to download. However, OpenOffice 2.3 doesn't work with Java on Mac OS 10.5; you need OpenOffice 2.4. See the Mac_OS_X_10.5 FAQs.

OpenOffice.org Functionality depending on Java

For the policy for Java use in OpenOffice.org, please see

OpenOffice.org Base

  • Create Form Wizard

OpenOffice.org Writer

  • Letter Wizard
  • Fax Wizard
  • Agenda Wizard
  • HTML Wizard
  • SaveAs -> AportisDoc (Palm)
  • SaveAs -> DocBook
  • SaveAs -> Pocket Word (*.psw)

OpenOffice.org Calc

  • SaveAs -> Pocket Excel

OpenOffice.org Extensions

All


Question: What is exactly not working ? Tools->Macros->Organize Macros -> JavaScript|Beanshell|Python pops up a message boxes that no JRE is installed but then the Dialog is displayed (see Issue 37020 ).

Java detection in OpenOffice.org 2 and StarOffice 8

Which Java will be used?

StarOffice tries to detect the newest Java version installed. StarOffice only detects Sun Java versions, while OpenOffice.org also detects Java versions from other vendors.

When using versions from different vendors, the numbering system might be different so maybe not the newest version is used. You can change the Java version in StarOffice via tools/options/Java.

On GNOME, if AT tool support is enabled, StarOffice will use that latest version where the Java Access Bridge is enabled.

When is Java detection done?

On Windows, detection is done the first time Java is used. On Linux/Solaris, detection is done the first time a user starts StarOffice.

How do I see the System.out.println output of Java components in OpenOffice.org?

You'll find some suggestions here :

http://www.oooforum.org/forum/viewtopic.phtml?t=66121

Does any one know the real answer?

How do I debug Java components in OpenOffice.org?

You must go to Tools.Options.OpenOffice.org.Java, and click 'Parameters' for your chosen JVM. This allows you to pass options into the JVM when it is initialised. At a minimum you will need something similar to:

-Xdebug
-Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

Note that when you are running a JVM with 'suspend=y' and you attempt to register a Java component, it will hang waiting for you to connect a debugger. In this case, you need to close down Office, change the configuration back, register the component, then re-start office, add in the JVM parameters, then call the Java component again. To speed this process up a bit, you can edit the java settings file contained in your user config directory, which on windows will be something like:

C:\Documents and Settings\<windows username>\Application Data\OpenOffice.org2\user\config\java_settings_Windows_x86.xml

It contains an element called 'vmParameters'. When you have java debugging enabled it will look something like:

<vmParameters xsi:nil="false">
<param>-Xdebug</param>
<param>-Xnoagent</param>
<param>-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</param>
</vmParameters>

If you are not running with debug it will contain:

<vmParameters xsi:nil="false"/>

It is a little bit quicker to manually edit this file between restarts then to use the UI.

How can I reset the Java configuration?

The configuration is stored in

< staroffice-config > /user/config/javasettings_ < platform > .xml

Just delete this file if you want StarOffice to detect again. The Java configuration file cannot be modified manually. The data format is not specified and may change anytime without further notice. Don't try to modify that file to change the Java version. The < location > and < version > entries are only for 'documentation', the Java version is accessed via the < vendorData > , which is binary.

External links

Personal tools