|
Kelly wrote:
How do we set the classpath? We don't really want to use the system's environment classpath because it is different than what we need and it doesn't seem like a good idea to add a bunch of unless classes & jars just to execute the single class.
You shouldn't need to modify the classpath at all to use Java in stored procedures. The classes you need either need to be in the /QIBM/UserData/OS400/SQLLib/Function directory (in the appropriate subdirectories if part of a package) or in JAR files registered to the database. To do that, you use a procedure called SQLJ.INSTALL_JAR and it makes that JAR file available to all stored procedures or user defined functions. It essentially adds the JAR to the database classpath, which is separate from the system classpath. Do a search on Google or IBM's site for the "IBM Developer Kit for JAVA" pdf. There's a section called "Java SQL routines" that will tell you everything you need to know about getting started. ************************************************************************************************** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** eSafe scanned this email for viruses, vandals and malicious content. ** **************************************************************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.