Difference between revisions of "Documentation/DevGuide/FirstSteps/Configuration"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{DevGuide|FirstSteps=block|FirstSteps2a=block|PrevNext=block|Prev=Installation Sets|Next=First Contact}}
 
{{DevGuide|FirstSteps=block|FirstSteps2a=block|PrevNext=block|Prev=Installation Sets|Next=First Contact}}
====Enable Java in [PRODUCTNAME]====
+
====Enable Java in {{PRODUCTNAME}}====
[PRODUCTNAME] uses a Java Virtual Machine to instantiate components written in Java. From [PRODUCTNAME] [OO2.0] on, Java is found automatically during startup, or latest when Java functionality is required. If you prefer to preselect a JRE or JDK, or if no Java is found, you can configure Java using the Tools – Options dialog in [PRODUCTNAME] and select the section [PRODUCTNAME] – Java section. In older versions of [PRODUCTNAME] you can also easily tell the office which JVM to use: launch the jvmsetup executable from the programs folder under the [PRODUCTNAME], select an installed JRE or JDK and click OK. Close the [PRODUCTNAME] including the Quickstarter in the taskbar and restart [PRODUCTNAME]. Furthermore, open the Tools - Options dialog in [PRODUCTNAME], select the section [PRODUCTNAME] - Security and make sure that the Java enable option is checked.
+
{{PRODUCTNAME}} uses a Java Virtual Machine to instantiate components written in Java. From {{PRODUCTNAME}} [OO2.0] on, Java is found automatically during startup, or latest when Java functionality is required. If you prefer to preselect a JRE or JDK, or if no Java is found, you can configure Java using the Tools – Options dialog in {{PRODUCTNAME}} and select the section {{PRODUCTNAME}} – Java section. In older versions of {{PRODUCTNAME}} you can also easily tell the office which JVM to use: launch the jvmsetup executable from the programs folder under the {{PRODUCTNAME}}, select an installed JRE or JDK and click OK. Close the {{PRODUCTNAME}} including the Quickstarter in the taskbar and restart {{PRODUCTNAME}}. Furthermore, open the Tools - Options dialog in {{PRODUCTNAME}}, select the section {{PRODUCTNAME}} - Security and make sure that the Java enable option is checked.
  
 
====Use Java UNO class files====
 
====Use Java UNO class files====
Next, the [PRODUCTNAME] class files must be made known to the Java IDE. For NetBeans these Java UNO jar files must be mounted to a project. The following steps show how to create a new project and mount class files in NetBeans from version 3.5.1.
+
Next, the {{PRODUCTNAME}} class files must be made known to the Java IDE. For NetBeans these Java UNO jar files must be mounted to a project. The following steps show how to create a new project and mount class files in NetBeans from version 3.5.1.
  
 
# From the Projectmenu, select Project Manager. Click the New... button in the Project Manager window to create a new project. NetBeans uses your new project as the current project.
 
# From the Projectmenu, select Project Manager. Click the New... button in the Project Manager window to create a new project. NetBeans uses your new project as the current project.
# Activate the NetBeans Explorer window—it should contain a Filesystems item (to display the NetBeans Explorer window, click View - Explorer). Open its context menu and select Mount – Archive Files, navigate to the folder <OfficePath>/program/classes, choose  at least jurt.jar, unoil.jar, ridl.jar and juh.jar in that directory and click Finish to mount the [PRODUCTNAME] jars in your project. As an alternative, you can also mount files using File - Mount Filesystem.
+
# Activate the NetBeans Explorer window—it should contain a Filesystems item (to display the NetBeans Explorer window, click View - Explorer). Open its context menu and select Mount – Archive Files, navigate to the folder <OfficePath>/program/classes, choose  at least jurt.jar, unoil.jar, ridl.jar and juh.jar in that directory and click Finish to mount the {{PRODUCTNAME}} jars in your project. As an alternative, you can also mount files using File - Mount Filesystem.
 
# Finally you need a folder for the source files of your project. Choose Mount – Local Directory from the context menu of the Filesystems icon and use the file manager dialog to create a new folder somewhere in your file system. Select it without opening it and click Finish to add it to your project.
 
# Finally you need a folder for the source files of your project. Choose Mount – Local Directory from the context menu of the Filesystems icon and use the file manager dialog to create a new folder somewhere in your file system. Select it without opening it and click Finish to add it to your project.
  
 
====Add the API Reference to your IDE====
 
====Add the API Reference to your IDE====
We recommend to add the API and the Java UNO reference to your Java IDE to get online help for the [PRODUCTNAME] API and the Java UNO runtime. In NetBeans 3.4.1, follow these steps:
+
We recommend to add the API and the Java UNO reference to your Java IDE to get online help for the {{PRODUCTNAME}} API and the Java UNO runtime. In NetBeans 3.4.1, follow these steps:
  
 
* Open your project and choose the Tools – Javadoc Manager menu. With the button Add Folder... add the folders docs/common/ref and docs/java/ref of your SDK installation to use the API and the Java UNO reference in your project.
 
* Open your project and choose the Tools – Javadoc Manager menu. With the button Add Folder... add the folders docs/common/ref and docs/java/ref of your SDK installation to use the API and the Java UNO reference in your project.
* You can now use Alt + F1 to view online help while the cursor is on a [PRODUCTNAME] API or Java UNO identifier in the source editor window.
+
* You can now use Alt + F1 to view online help while the cursor is on a {{PRODUCTNAME}} API or Java UNO identifier in the source editor window.
 
+
  
 
[[Category: Development Concepts]]
 
[[Category: Development Concepts]]

Revision as of 09:54, 16 May 2007

Template:DevGuide

Enable Java in OpenOffice.org

OpenOffice.org uses a Java Virtual Machine to instantiate components written in Java. From OpenOffice.org [OO2.0] on, Java is found automatically during startup, or latest when Java functionality is required. If you prefer to preselect a JRE or JDK, or if no Java is found, you can configure Java using the Tools – Options dialog in OpenOffice.org and select the section OpenOffice.org – Java section. In older versions of OpenOffice.org you can also easily tell the office which JVM to use: launch the jvmsetup executable from the programs folder under the OpenOffice.org, select an installed JRE or JDK and click OK. Close the OpenOffice.org including the Quickstarter in the taskbar and restart OpenOffice.org. Furthermore, open the Tools - Options dialog in OpenOffice.org, select the section OpenOffice.org - Security and make sure that the Java enable option is checked.

Use Java UNO class files

Next, the OpenOffice.org class files must be made known to the Java IDE. For NetBeans these Java UNO jar files must be mounted to a project. The following steps show how to create a new project and mount class files in NetBeans from version 3.5.1.

  1. From the Projectmenu, select Project Manager. Click the New... button in the Project Manager window to create a new project. NetBeans uses your new project as the current project.
  2. Activate the NetBeans Explorer window—it should contain a Filesystems item (to display the NetBeans Explorer window, click View - Explorer). Open its context menu and select Mount – Archive Files, navigate to the folder <OfficePath>/program/classes, choose at least jurt.jar, unoil.jar, ridl.jar and juh.jar in that directory and click Finish to mount the OpenOffice.org jars in your project. As an alternative, you can also mount files using File - Mount Filesystem.
  3. Finally you need a folder for the source files of your project. Choose Mount – Local Directory from the context menu of the Filesystems icon and use the file manager dialog to create a new folder somewhere in your file system. Select it without opening it and click Finish to add it to your project.

Add the API Reference to your IDE

We recommend to add the API and the Java UNO reference to your Java IDE to get online help for the OpenOffice.org API and the Java UNO runtime. In NetBeans 3.4.1, follow these steps:

  • Open your project and choose the Tools – Javadoc Manager menu. With the button Add Folder... add the folders docs/common/ref and docs/java/ref of your SDK installation to use the API and the Java UNO reference in your project.
  • You can now use Alt + F1 to view online help while the cursor is on a OpenOffice.org API or Java UNO identifier in the source editor window.
Personal tools