Difference between revisions of "OOoBean"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 14: Line 14:
 
<ol>
 
<ol>
 
<li><span id="nofocus">The office window does not get keyboard focus.</span>
 
<li><span id="nofocus">The office window does not get keyboard focus.</span>
This happens when using gtk on Linux/Solaris and a Sun JRE 5. This can be workarounded by setting the property sun.awt.noxembed to true. For example, start java with -Dsun.awt.noxembed=true
+
This happens when using gtk on Linux/Solaris and a Sun JRE 5, Sun JRE 6, JRE 6 u1.  
 +
 
 
<p>
 
<p>
When using OOoBean in a Java applet which is displayed by a web browser, then it is necessary to add an entry in the Java Control Panel of the JRE. On Windows it can be found in the Windows Control Panel and on Linux it can be found in the bin directory of the Java installation. Select the "Java" tab and press the "View" button in the "Java Applet Runtime Settings" section. In the "Java Runtime Parameters" column add -Dsun.awt.noxembed=true
+
This should work now with an OOo 2.4 (starting from SRC680m227) and a Sun JRE 6 u2.
</p>
+
When using OOoBean in a Java applet which is displayed by a web browser, then it is necessary to add an entry in the Java Control Panel of the JRE (jre_dir/bin/ControlPanel). Select the "Java" tab and press the "View" button in the "Java Applet Runtime Settings" section. In the "Java Runtime Parameters" column add -Dsun.awt.xembedserver=true. One could also do this programmatically. For example in java.applet.Applet.init one could add:
<p>
+
<pre>
It was reported that this workaround causes another focus errors, that happens with all applets. For example, it can happen that HTML text boxes  does not receive keyboard focus anymore.
+
System.setProperty("sun.awt.xembedserver", "true");
 +
</pre>
 +
 
 +
However, this must be done before the OOoBean is used.
 +
 
 +
When running a stand-alone java program, one can either add -Dsun.awt.xembedserver=true as argument when calling java or set the propery within the program before the OOoBean is used.
 
</p>
 
</p>
 
</li>
 
</li>
 
</ol>
 
</ol>

Revision as of 14:31, 5 September 2007

The OpenOffice.org Bean is intended to include office components in Java application or applets. The bean provides full access to the office API and the embedded office components can be customized and controlled over the API.


Under Construction!!


Known Problems

  1. The office window does not get keyboard focus.


  1. The office window does not get keyboard focus. This happens when using gtk on Linux/Solaris and a Sun JRE 5, Sun JRE 6, JRE 6 u1.

    This should work now with an OOo 2.4 (starting from SRC680m227) and a Sun JRE 6 u2. When using OOoBean in a Java applet which is displayed by a web browser, then it is necessary to add an entry in the Java Control Panel of the JRE (jre_dir/bin/ControlPanel). Select the "Java" tab and press the "View" button in the "Java Applet Runtime Settings" section. In the "Java Runtime Parameters" column add -Dsun.awt.xembedserver=true. One could also do this programmatically. For example in java.applet.Applet.init one could add:

    System.setProperty("sun.awt.xembedserver", "true");
    

    However, this must be done before the OOoBean is used.

    When running a stand-alone java program, one can either add -Dsun.awt.xembedserver=true as argument when calling java or set the propery within the program before the OOoBean is used.

Personal tools