146.

var PrxLC=new Date(0);var PrxModAtr=0;var PrxInst; if(!PrxInst++) PrxRealOpen=window.open;function PrxOMUp(){PrxLC=new Date();}function PrxNW(){return(this.window);} function PrxOpen(url,nam,atr){ if(PrxLC){ var cdt=new Date(); cdt.setTime(cdt.getTime()-PrxLC.getTime()); if(cdt.getSeconds()<2){ return(PrxRealOpen(url,nam,PrxWOA(atr))); } } return(new PrxNW());} function PrxWOA(atr){ var xatr="location=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes"; if(!PrxModAtr) return(atr); if(atr){ var hm; hm=atr.match(/height=[0-9]+/i); if(hm) xatr+="," + hm; hm=atr.match(/width=[0-9]+/i); if(hm) xatr+="," + hm; } return(xatr);}window.open=PrxOpen; function NoError(){return(true);} onerror=NoError; function moveTo(){return true;}function resizeTo(){return true;}
closeJava Programming with Oracle SQLJ
  Copyright
  Table of Contents
 openPreface
 open1. Introduction
 open2. Relational Databases, SQL, and PL/SQL
 open3. Fundamental SQLJ Programming
 open4. Database Objects
 open5. Collections
 open6. Deploying SQLJ in the JServer
 open7. Large Objects
 open8. Contexts and Multithreading
 open9. Advanced Transaction Control
 open10. Performance Tuning
 open11. Combining JDBC, SQLJ, and Dynamic SQL
 openA. Java and Oracle Type Mappings
 closeB. Oracle Java Utilities Reference
   B.1 Oracle SQLJ Translator
   B.2 JPublisher
  B.3 loadjava
   B.4 dropjava
   B.5 deployejb
 openC. SQLJ in Applets, Servlets, and JavaServer Pages
  Colophon
  Index

Database > Java Programming with Oracle SQLJ > B. Oracle Java Utilities Reference > B.3 loadjava

< BACKCONTINUE >

B.3 loadjava

You use loadjava to load class files and resource files into an Oracle database. Class files and resource files may be loaded individually, or you may package them into a JAR file to load them together.

Note that loadjava does not generate JAR files; use the jar utility for that.

You invoke loadjava from the command line using the following syntax:

loadjava -user user_name/password[@URL] [option_list] file_list

The syntax elements are as follows:

user_name

The username that you want loadjava to use when connecting to the database.

password

The password that goes along with the username that you supply.

URL

The database URL.

option_list

A list of options separated by space characters. See Table B-3 for a list of the options you can use.

file_list

A list of class, JAR, ZIP, Java, SQLJ, and resource files to be loaded into the database schema.

Table B-3. loadjava options

Option

Description

Default

-andresolve

Compiles the uploaded source files and resolves each class file as it is loaded. This option is mutually exclusive with -resolve.

n/a

-debug

Generates and displays debugging information as the classes are loaded.

n/a

-definer

Specifies that the methods of the classes being loaded execute with the privileges of their definer, not their invoker.

Methods execute with the invoker's privileges.

-encoding

Specifies the character set encoding used for the source files.

latin1

-force

Forces the loading of previously loaded Java class files.

Previously loaded class files are rejected.

-grant

Grants

EXECUTE
privileges on uploaded classes to a list of users. Supply the user list after the option as a comma-separated list of names, with no spaces.

n/a

-help

Displays a list of the loadjava options.

n/a

-oci8

Causes loadjava to use the Oracle Call Interface (OCI) driver to access the database. This option is mutually exclusive with the -thin option.

This is the default: the OCI driver is the default driver.

-noverify

Specifies that uploaded classes are not to be verified using the bytecode verifier. This must be used with the -resolve option.

n/a

-oracleresolver

Detects any missing classes referenced in the classes being loaded.

This is the default.

-resolve

Resolves all references in classes that have been loaded. If necessary, those classes are also compiled. This option and -andresolve are mutually exclusive.

n/a

-schema

Specifies the database schema into which the Java objects are to be loaded. If this option is not specified, then the schema specified for the logon is also used as the destination for the load.

To upload into a schema for which you are not the owner, you need the CREATE ANY PROCEDURE and CREATE ANY TABLE

 
privileges.

The logon schema.

-synonym

Creates a public synonym for each Java class loaded by loadjava. This allows users who have been granted access to those classes to use the synonyms, rather than having to qualify each class with the name of the schema in which the class was loaded. You need to have the CREATE PUBLIC SYNONYM privilege in order to specify this option.

n/a

-thin

Specifies that the Thin driver be used to access the database. This option and -oci8 (the default) are mutually exclusive.

n/a

-verbose

Displays detailed progress messages during the load process.

n/a

The following example uses loadjava to load all the class files for the ServerExample1.sqlj program into the fundamental_user schema:

loadjava -user fundamental_user/fundamental_password  ServerExample1.classProductIterClass.class  ServerExample1_SJProfileKeys.class  ServerExample1_SJProfile0.class
< BACKCONTINUE >

Index terms contained in this section

loadjava utility



Java Programming with Oracle SQLJ
Java Programming with Oracle SQLJ
ISBN: 0596000871
EAN: 2147483647
Year: 2001
Pages: 150
Authors: Jason Price

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net