loadjava is one way of creating Java classes in the database. It is a preferred method since it can leverage Java development environments and then load the generated Java class and JAR files. The DDL statements described in the following sections can also be used to create Java classes or related files.
The create java class command can be used to load a Java class file from the operating system. An Oracle directory object must be created so the class file can be found on the operating system. The following statement can be used to load an individual Java class into Oracle:
SQL> CREATE JAVA CLASS USING BFILE (java_dir, 'MyFirstProgram.class');
The create java ...