Using netbeans
Build and execute qadevOOo with NetBeans.Pre-requisites
- An installed version of NetBeans
- The installable package unpacked and its contents stored in a local folder, in the following called qadev_home.
- An installed version of the Office
Setting up a new project
Start the project manager and create a new project (suggested name: qadevOOo).Mounting Jars and Files
In the "Explorer" section of NetBeans (left on the screen) choose the "Filesystems" tab to mount the following directories and jars.
- Jars to be mounted: those can be found in the program/classes subdirectory of your Office installation.
Click right on "Filesystems" inside of the window, and go to mount -> Archive Files for this purpose - java_uno.jar
- juh.jar
- jurt.jar
- ridl.jar
- sandbox.jar
- unoil.jar
- Directories to be mounted: those can be found in the qadev_home directory
Click right on "Filesystems" inside of the window, and go to mount -> local Directory for this purpose - runner
- tests
- classes
Adding packages to project
Choose the "project qadevOOo" tab to add the following packages to your project. Click right on "project qadevOOo" inside of the window, and go to add existing ... for this purpose
all packages can be found in the qadev_home directory and the packages "mod" and "ifc" that are located in the subfolder tests/java.
Adjust the project settings
Set the output directory for the classes via Tools -> Options. The register card for this is located in Options -> Building -> Compiler Types. In the right part of the screen, you have to select a Target which determines the output directory. Select qadev_home/classes in the dropdown-list.
Finally set the main class via "Project -> Set Project Main Class...". Choose "org -> openOffice" and select Runner in the following tree structure.
Compilation and execution
Compilation
To compile the whole project switch to the Project tab in the explorer, mark all directories, click right and select Compile All.Execution
select the Runner in the "Explorer" window to add some arguments for the execution. You'll find these in the properties of the Runner, which are displayed underneath the "Explorer" window. Select the Execution tab and make the following entry:-tdoc /qadev_home/testdocs -objdsc /qadev_home/objdsc -o sw.SwXBodyTextThe first parameter is the path to the test documents, which are used during test execution, and the second point to the object descriptions. sw.SwXBodyText is the name of the test. The example entry has to be adjusted to your file structure, and your operating system (giving here an entry for Solaris/Linux). Also assumed as default is that you would like to execute a Java test and that an Office is running that can be connected.
Start the Office as follows:
soffice -accept=socket,host=localhost,port=8100;urp;Port 8100 is the default port that the OOoRunner will use for connecting the Office.
Execute your test either via "Project -> Execute Project" or press the shortcut "CTRL-SHIFT-F6". To debug use "Project -> Debug Project" or press the shortcut "CTRL-SHIFT-F5".
Also see the General User Guide for more information.
Last Modified: $Date: 2004/03/10 15:58:38 $