Oracle COM Automation for Java README
************************************************************************
Copyright (C) 2000 Oracle Corporation, All rights reserved.
This document discusses the necessary steps that must be followed in order
to install and configure the COM Automation for Java Feature. For the most
up-to-date information, please see Oracle COM Automation Developer's Guide.
Oracle COM Automation for Java Feature includes the following components:
* COM Automation for Java Feature (orawcom.dll)
* COM Automation Java classes (orawcom.jar)
* An Oracle to Microsoft Word data exchange solution
System Requirement
===================
The Oracle COM Automation for Java Feature requires the following:
* Oracle 9i Database
* Windows NT 4.0 or Windows 2000
Installation
============
The following steps detail how to install the COM Automation
for Java Feature.
* Open a MS-DOS command prompt.
* Change the directory to com\java.
cd ORACLE_BASE\ORACLE_HOME\com\java
* Load the COM Automation Java classes into the desired database schema
using the loadjava tool. For example:
loadjava -force -resolve -user hr/hr orawcom.jar
Solutions for Oracle COM Automation for Java Feature
====================================================
As part of Oracle COM Automation for Java Feature, several solutions
are provided to give developers an idea of how to use the COM Automation
for Java Feature to build solutions. These solutions provide base
functionality. They are provided as both examples as to how to use the
COM Automation for Java Feature and as a foundation upon which to build
more customized, complex applications that use COM Automation for Java.
Microsoft Word Solution
-----------------------
The following sections detail how to install the Microsoft Word Solution
and describe the Application Programming Interfaces (APIs) that it exposes.
This solution is provided as an example of the types of solutions that can
be built with Oracle and Microsoft Word.
The Microsoft Word Solution provides a Java class (TestWORD) for
manipulating Microsoft Word. Also, the Microsoft Word Solution includes
a static method in that Java class to demonstrate the capabilities of
exchanging data between Oracle and Microsoft Word. The test static method
exchanges data from the employees table in Oracle to a Microsoft
Word document. A developer should invoke this static method after
installing the solution.
This demo relies on the human resources schema in the common schema.
Microsoft Word Solution Installation
The following steps detail how to install the Microsoft Word Solution.
Microsoft Word must be installed on the local machine for this solution to
work properly.
* Open a MS-DOS command prompt.
* Change to the com\java\demos directory.
cd ORACLE_BASE\ORACLE_HOME\com\java\demos
* Load the TestWORD Java classes into the desired database schema using
the loadjava tool. For example:
loadjava -force -resolve -user hr/hr TestWORD.class
* Connect to the database using SQL*Plus. For example:
sqlplus hr/hr
* From the SQL*Plus prompt, create the call spec.
@TestWORD.sql
Using the Microsoft Word Solution
The following steps detail how to execute the Microsoft Word solution.
* Open a MS-DOS command prompt.
* Connect to the database using SQL*Plus. For example:
sqlplus hr/hr
* Allow SQL*Plus to display output from the Java program.
set SERVEROUTPUT on
* Invoke the Java code. This code will create a Word document
(worddemoj.doc) in the c:\. The document will contain data
from the employees table.
call TestWORD();
* Open the worddemoj.doc to see its content.
Known Bugs
==========
At present, a developer cannot call COM Automation method that displays a
window, message box, or dialog box.
The workaround is to avoid calling methods that display such dialog boxes.
For example, the Microsoft Excel solution appends the time stamp to the
filename (e.g. excelxxxxx.xls) to ensure that no two files are named the
same. Excel displays an overwrite dialog box, if a file has the same name,
when you attempt to save it using COM Automation. Microsoft Word does not
do this.