interMedia Java Client Program Examples
An ImgDemo sample application
has been provided to help developers learn how to use the new interMedia
java classes. The sample code demonstrates how to insert rows with interMedia
columns, load data into interMedia columns and process images. It
also demonstrates how to extract properties and download data from interMedia
objects.
Note, this example requires the
interMedia 8.1.7 Java Classes.
Download the kit
Requirements for the sample applications
Before running a sample application:
o Install Oracle8i and interMedia (including
the new interMedia Java Classes)
o Make sure imgdemo.dat is in the directory
that contains the sample
o Execute ImageDemo.sql
- It will:
- create
a table with two columns of type OrdImage
o Ensure that the Java environment is correct
and set up to compile and run Java programs.
o Confirm that the CLASSPATH environment
variable includes the following (note that the location of the jdk classes
is version
and installation dependent
and not mentioned here):
Unix:
<ORACLE_HOME>/jdbc/lib/classes111.zip
or classes12.zip
<ORACLE_HOME>/ord/jlib/ordim817.zip
<ORACLE_HOME>/sqlj/lib/runtime.zip
Windows NT:
<ORACLE_HOME>\jdbc\lib\classes111.zip
or classes12.zip
<ORACLE_HOME>\ord\jlib\ordim817.zip
<ORACLE_HOME>\sqlj\lib/runtime.zip
o Be sure the location of the JDBC OCI
shared library is specified in LD_LIBRARY_PATH (for UNIX) or PATH (for
Windows NT). Note that this
library may already be specified
since the same shared library location must be specified to use other
client applications such as SQL*Plus.
Unix:
<ORACLE_HOME>/lib
(for libocijdbc8.so)
Windows NT:
<ORACLE_HOME>\bin
(for ocijdbc8.dll)
Comple the sample applications
Compile the sample using using:
javac
compiler
jdk1.1.8
or later
Run the sample applications
From the command line, type:
java
ImgDemo
|