Skip Headers
Oracle® Database Lite Developer's Guide
10g (10.2.0)
Part No. B15920-01
  Go To Table Of Contents
Go To Index


9 Java Application Development

The following sections describe how to develop and test Java applications:

9.1 Java Support for Applications

Table 9-1 lists the Java support provided for each platform in Oracle Database Lite.

Table 9-1 Java Support

Category Windows 32 Web Windows 32 Native Windows CE Linux (1) For More Information...

Oracle Database Lite offer three JDBC drivers. Refer to Section 9.1.1, "JDBC Drivers".

Yes Yes Yes

On Linux, only JDBC and ODBC access is supported.

Chapter 10, "JDBC Programming"
Java Stored Procedures /Triggers Yes

Java Stored Procedures/Triggers are not supported in the Web-to-Go application model. However Java Stored Procedures can be replicated using the Consolidator Manager API.

Yes N/A Yes Chapter 11, "Java Stored Procedures and Triggers"
Java Server Pages 1.1 N/A N/A N/A Section 7.2.3, "Developing JavaServer Pages"
Java Servlet 2.2 N/A N/A N/A Section 7.2.4, "Developing Java Servlets for Web-to-Go" and Section 7.2.7, "Developing Applet Servlet Communication"
BC4J Yes

Latest version of Oracle JDeveloper 10g.

Struts Yes N/A N/A N/A

In addition, for programmatically synchronizing from a Java application, see Chapter 3, "Synchronization".

9.1.1 JDBC Drivers

The Oracle Database Lite JDBC driver is JDBC 1.2 compliant. Oracle Lite provides a limited number of extensions specified by JDBC 2.0. These extensions are compatible with the Oracle Database JDBC implementation.

Oracle Database Lite offers the following JDBC drivers:

  • Type 2 driver: There are two types of type 2 driver: one provides an embedded, direct connnection. This driver allows Java applications to communicate directly with the Oracle Lite database. The other type 2 driver provides a remote connection and requires Multi-User service support.

  • Type 4 driver : 100% Java implementation. Requires the multi-user database version.

9.2 Oracle Database Lite Java Development Environment

To develop Java applications, you need to set up your development environment to create Oracle Database Lite applications, as follows:

9.2.1 Setting Variables for JDK 1.4.2

The directory with the JDK 1.4.2 Java compiler (javac.exe) should be in the PATH variable before any other directories that contain other Java compilers.

Add the directory that contains the Classic Java Virtual Machine (JVM) shared library, jvm.dll, to the PATH. jvm.dll should be in your JDK_Home\jre\bin\classic directory.

For example,

set PATH=C:\JDK_Home\bin;c:\JDK_Home\jre\bin\classic
set CLASSPATH=c:\JDK_Home\jrc\lib\rt.jar;c:\OLITE_HOME\bin\olite40.jar

As an alternative to using the Classic JVM, you can use the HotSpot JVM. HotSpot is a JDK add on module provided by Sun Microsystems. HotSpot is available from the Sun Microsystems Web site.

After installing HotSpot, set your PATH as given below.

set PATH=c:\jdk\bin;c:\jdk\jre\bin\hotspot;%PATH%

In the example above, your installation of the JDK and HotSpot is on Drive C:\. Verify the location of your installation before amending your PATH statement. To test whether your system is set up correctly, run the Java examples in the <ORACLE_HOME>\Mobile\Sdk\Samples\JDBC directory.

9.3 Java Development Tools

To write and debug Java programs, you can use any Java development tool. However, you must ensure that you set the CLASSPATH and PATH correctly.