Java
  Home arrow Java arrow Page 3 - Java Stored Procedure in Oracle, Database ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Java Stored Procedure in Oracle, Database Interaction
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 21
    2005-11-01

    Table of Contents:
  • Java Stored Procedure in Oracle, Database Interaction
  • A Simple Java Class
  • Getting Java Classes into Oracle Database
  • How to make Classes available to Oracle
  • How to execute the Java Stored Procedures

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Java Stored Procedure in Oracle, Database Interaction - Getting Java Classes into Oracle Database


    (Page 3 of 5 )

    The simple Java class we created in the previous section needs to become a full-fledged schema object before it could be accessed, as if it is a native stored procedure.  Oracle provides a command-line utility called “loadjava” to accomplish this task. The “loadjava” utility essentially provides an interface for SQL based CREATE JAVA statements, which also may be used to migrate Java-related files to the database.

    We need not compile the previous program using the traditional “javac” compiler;  “loadjava” does even that for us during its loading process. This is achieved by specifying the -resolve attribute on the utility.

    $ loadjava -u scott/tiger -v -resolve Employee.java

    The following commands would help you to know the status of what you created.

    SELECT object_name, object_type, status
    FROM user_objects WHERE object_type LIKE 'JAVA%';

    You should attain the “VALID” in the output.  Otherwise something is wrong with your program.  If you receive any errors, you should query “USER_ERRORS” to view more information and correct them accordingly.

    More Java Articles
    More By Jagadish Chaterjee


       · get in touch with Java stored procedure here and don't forget to give me the...
       · Nice basic article, it would be great to have an example of using an external object...
       · sure...I will plan one more...and thanks for the feedback
       · Hi, Iam doing a comparison of Java and Oracle stored procedures and i find the...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT