- The Java Environment in Apache OpenOffice
- Apache OpenOffice
- OpenOffice.org 2.0
- Versions prior to OpenOffice.org 2.0
- Configuration
- Using the Java UNO runtime and API in your IDE
- Prepare the NetBeans IDE
- Prepare the Eclipse IDE
- Add the API Reference to your IDE
- База Знаний: Использование Java Runtime Environment в Apache OpenOffice
- Java Runtime Environment
- Функциональные особенности программы JRE
- Джава Рантайм
The Java Environment in Apache OpenOffice
When UNO components written in Java are to be used within the office suite, the office suite has to be configured to use the appropriate JRE. For information on the supported JREs see Documentation/FAQ/Installation/Which version of Java do I need?.
Apache OpenOffice
Since the release of Apache OpenOffice 3.4.0 you can set the JRE from the menu Tools->Options : tree node OpenOffice->Java.
OpenOffice.org 2.0
In OpenOffice.org 2.0 there is no java(.ini|rc) anymore. All basic Java settings are set in the options dialog: tree node OpenOffice.org->Java. The Parameters dialog can be used to specify the debug options and other arguments.
For applets there are still a few settings on the security panel (tree node OpenOffice.org->Security).
Versions prior to OpenOffice.org 2.0
Prior to OpenOffice.org 2.0, this configuration happened during the installation, when the Java setup was performed. Then, a user could choose a Java Runtime Environment or choose to install a JRE. After installing the office, the selected JRE could still be changed with the jvmsetup program, which was located in the program folder. The data for running the Java Virtual Machine was stored in the java(.ini|rc) file and other configuration files.
The java(.ini|rc) actually is an implementation detail. Unfortunately, it needs to be modified under some rare circumstances, for example for debugging purposes. You must not rely on the existence of the file nor should you make assumptions about its contents. |
In an office with a lower version than 2.0, the java(.ini|rc) is located in the \user\config directory. A client can use that file to pass additional properties to the Java Virtual Machine, which are then available as system properties. For example, to pass the property MyAge , invoke Java like this:
If you want to have that system property accessible by your Java component you can put that property into java(ini|rc) within the [Java] section. For example:
[Java] Home=file:///C:/Program%20Files/Java/j2re1.4.2 VMType=JRE Version=1.4.2 RuntimeLib=file:///C:/Program%20Files/Java/j2re1.4.2/bin/client/jvm.dll SystemClasspath=d:\645m15\program\classes\classes.jar;; . Java=1 JavaScript=1 Applets=1 MyAge=27
To debug a Java component, it is necessary to start the JVM with additional parameters. The parameters can be put in the java.ini the same way as they would appear on the command-line. For example, add those lines to the [Java] section:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000
More about debugging can be found in the JDK documentation and in the Apache OpenOffice Software Development Kit.
Java components are also affected by the following configuration settings. They can be changed in the Tools — Options dialog. In the dialog, expand the OpenOffice node on the left-hand side and choose Security. This brings up a new pane on the right-hand side that allows Java specific settings:
Java Setting | Description |
---|---|
Enable | If checked, Java is used with the office. This affects Java components, as well as applets. |
Security checks | If checked, the security manager restricts resource access of applets. |
Net access | Determines where an applet can connect. |
ClassPath | Additional jar files and directories where the JVM should search for classes. Also known as user classpath. |
Applets | If checked, applets are executed. |
Configuration
Apache OpenOffice uses a Java Virtual Machine to instantiate components written in Java. From OpenOffice.org 2.x 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 Apache OpenOffice and select the section OpenOffice – Java section. In older versions of Apache OpenOffice you can also easily tell the office which JVM to use: launch the jvmsetup executable from the programs folder under the Apache OpenOffice, select an installed JRE or JDK and click OK. Close the Apache OpenOffice including the Quickstarter in the taskbar and restart Apache OpenOffice. Furthermore, open the Tools — Options dialog in Apache OpenOffice, select the section OpenOffice — Security and make sure that the Java enable option is checked.
Using the Java UNO runtime and API in your IDE
Next, the Apache OpenOffice API and Java UNO runtime class files must be made known to the Java IDE.
Prepare the NetBeans IDE
For NetBeans the necessary jar files are made available by simply installing the Apache OpenOffice API Plugin for NetBeans. After the configuration the plugin installs a new library in NetBeans that can be used in projects directly. The library will be automatically added to new projects created with the project wizards coming with the plugin. The following steps show how to install the plugin in NetBeans 5.5 or higher and how to create a new UNO client application project.
- Install and start NetBeans.
- From the Tools menu, select Update center. check mark at least the NetBeans Update Center and press Next. Under Features search for the entry OpenOffice.org API Plugin, select the entry, Add it, press Next, accept the license and follow the next steps to install it completely.
- A plugin specific configuration dialog comes up and required the input of a PATH to a valid office and office SDK installation . After completion of this dialog the plugin is installed and configured correctly.
- If you have a 64-bit machine, use Tools | Java Platforms to register your 32-bit JDK installation.
- From the File menu, select New Project. Select OpenOffice.org category and select the OpenOffice.org Client Application. Follow the next step and finish the project wizard.
- A new project with your specified name is created. The main function of a generated JAVA skeleton contains already the UNO bootstrap function that gives you access to an office context object as main entry point to get started with the Apache OpenOffice API. The context object is from a remote office instance that is connected over a named pipe connection and the default office is started automatically if no instance is running.
- If you have a 64-bit machine, right-click the project name in the project explorer on the left and choose Properties. Click the Libraries Category on the left and use the drop-down box on the right to choose your registered 32-bit Java Platform (JDK), then click the OK button.
- You can now edit, compile, and run your Apache OpenOffice project.
Prepare the Eclipse IDE
For Eclipse the necessary jar files may be made available by defining a User Library.
- Install and start Eclipse.
- From the Window menu, select Preferences. On the dialog window, select Java > Build Path > User Libraries. Press New to create a new User Library. The library’s name might be OpenOffice.org Libraries [SDK 3.0.1]. Press OK.
- Select the library and press Add JARs. On the JAR-Selection dialog you should add the necessary libraries. For a standard installation of Apache OpenOffice on unix, these are
- /opt/openoffice.org/ure/share/java/juh.jar
- /opt/openoffice.org/ure/share/java/jurt.jar
- /opt/openoffice.org/ure/share/java/ridl.jar
- /opt/openoffice.org/basis3.0/program/classes/unoil.jar
A standard installation of Apache OpenOffice on unix is rooted as /opt . For other installations the libraries should be found at corresponding locations.
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 Apache OpenOffice API and the Java UNO runtime. The generated reference documentation provides Javadoc conform index files that can be integrated in most Java IDEs. In NetBeans the IDL reference is automatically integrated with the installation of the OpenOffice API Plugin.
Using the reference in NetBeans is quite simple, type an IDL type in the editor and press ALT + F1 . A further useful feature is the code completion feature that you get also automatically when you install the plugin.
База Знаний: Использование Java Runtime Environment в Apache OpenOffice
Java Runtime Environment используется в Apache OpenOffice для выполнения множества функций. В частности:
- для работы компонента Base;
- для медиапроигрывателя — проигрывание медиа в презентациях;
- для работы Мастера рассылки писем (также требуется Java Mail);
- для запуска Мастеров создания документов, конвертера документов;
- для экспорта в MediaWiki;
- при импорте документов из некоторых форматов, например, XML;
- для работы с макросами в некоторых случаях.
Подключение JRE, а так же выбор конкретной версии JRE производится в меню: Сервис → Параметры → Apache OpenOffice → Java
Обращение к этому пункту меню вызывает опрос установленных Java-машин, что может занять до нескольких минут. Следует подождать завершения операции. Настоятельно рекомендуется использовать Java-машину от Sun (Oracle), так как Java от других производителей приводит к ошибкам в работе Apache OpenOffice. Java Runtime Environment
Java Runtime Environment (JRE) — исполнительная среда для запуска и работы приложений, разработанных на одноименном языке программирования. Создателем этого программного обеспечения является известная компания Sun Microsystems (сейчас переименованная в Oracle).
Загрузить JRE можно для Windows 7 x64 (32-bit и 64-bit), Windows 10, 8, Windows XP, 2000, 2003, Vista. ПО заключает в себе виртуальную машину Java Virtual Machine и библиотеку Java-классов.
Вместе с другими средствами разработки данная среда входит в набор инструментов Java Development Kit (JDK).
На нашем сайте вы можете прямо сейчас скачать Java Runtime Environment — в каталоге вас ждет уже последняя версия.
Функциональные особенности программы JRE
Перед тем, как установить JRE, подчеркнем его преимущества и функциональные возможности:
- Вы сможете скачать JRE бесплатно!
- Запуск приложения без компилятора и каких-либо средств разработки.
- Возможность играть в онлайн-игры.
- Java JRE — инструмент для общения с людьми.
- Функции счета процентов.
- Просмотр 3D картинок.
- Программа Java Runtime Environment автоматически контролирует состояние памяти.
- Расширенный пакет средств обработки.
- Комплекс инструментов фильтрации ввода/вывода.
- Классы для обработки ответов и HTTP-запросов.
- Унифицированный доступ к разным базам данных.
Джава Рантайм
Эта кроссплатформенная программа может быть полезна в различных областях, поскольку технология Java задействована в веб-камерах, навигационных системах, играх, паркоматах, даже медицинских устройствах.
Она необходима для OpenOffice и для Minecraft, работоспособность некоторых их функций обеспечена именно этой средой.
Джава Рантайм распространяется по свободной лицензии, обновить ее можно через сайт Oracle, через торрент или наш каталог, воспользовавшись ссылкой ниже.
И не забывайте об одном из главных преимуществ языка программирования Джава — его кроссплатформенность, то есть запустить приложения, написанные на нем, вы сможете на разных операционных системах, если установите JRE.
Официальный сайт Sun Microsystems Поддерживаемые версии Windows 7, 10, 8, XP, Vista Лицензия Бесплатно Русский язык Нет Обновлено 2023-07-11 Количество загрузок 36856 Самые популярные программы
- uTorrent 3.5.5 Build 46348
- Adobe Flash Player 32.0.0.465
- WinRAR 6.21
- Google Chrome 111.0.5563.65
- DriverPack Solution 17.11.108
- Яндекс.Браузер 23.1.5
- Opera 96.0.4693.80
- Adobe Reader 2022.003.20322
- DirectX 9.29.1974 & 11
- Windows Movie Maker 2.6.4038.0
Последние обновленные программы
- WinRAR 6.21
- SaveFrom.net 9.91
- SHAREit 4.0.6.177
- Youtube Downloader HD 5.0.1
- Skype 8.96.0.207
- AdBlock 4.46.0
- DriverPack Solution 17.11.108
- K-Lite Codec Pack 64 bit 10.4.5
- Adobe Flash Player 32.0.0.465
- x360ce 4.17.15.0