The runtime Java classes

The runtime Java classes are the low-level classes that are made available to a database when it is created or Java-enabled. These classes include a subset of the Java API. These classes are part of the Sun Java Development Kit.

The runtime classes provide basic functionality on which to build applications. The runtime classes are always available to classes in the database.

You can incorporate the runtime Java classes in your own user-created classes: either inheriting their functionality or using it within a calculation or operation in a method.

Examples

Some Java API classes included in the runtime Java classes include:

  • Primitive Java data types   All primitive (native) data types in Java have a corresponding class. In addition to being able to create objects of these types, the classes have additional, often useful, functionality.

    The Java int data type has a corresponding class in java.lang.Integer.

  • The utility package   The package java.util.* contains a number of very helpful classes whose functionality has no parallel in the SQL functions available in SQL Anywhere.

    Some of the classes include:

    • Hashtable   maps keys to values.

    • StringTokenizer   breaks a String down into individual words.

    • Vector   holds an array of objects whose size can change dynamically.

    • Stack   holds a last-in, first-out stack of objects.

  • JDBC for SQL operations   The package java.SQL.* contains the classes needed by Java objects to extract data from the database using SQL statements.

Unlike user-defined classes, the runtime classes are not stored in the database. Instead, they are stored in files in the java subdirectory of your SQL Anywhere installation directory.