ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How set libray list in runjava

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott Klement
    replied
    Java typically uses something called JDBC (Java Database Connectivity) to connect and run SQL statements against a database. Since JDBC connects to a server job (a completely separate job from the one in which your Java program is running) it won't have the library list set.

    There is a 'libraries' property that you can set when you set up the JDBC connection. This can be set to include additional libraries. (The default property of *LIBL will be the library list of the background server job -- not your current job -- but you can do something like "*LIBL, LIB1, LIB2" to add two additional libraries that come after the server job's library list.)

    Many properties can be specified when connecting to a server database using JDBC. All properties are optional and can be specified either as part of the URL or in a java.util.Properties object. If a property is set in both the URL and a Properties object, the value in the URL will be used.

    Leave a comment:


  • gio.cot
    replied
    Hi Scott

    sorry .. i retry ..
    i have a CLLE that run runjava to exceute a Java Class ( i don't know Java) .. this class using SQL, execute an update in a file; as at this file, is "attached" a trigger, and when the update sql run , we receive error because the the triigger program is not found il library list .. so I thought how to set the right library list, when runs the java class ...
    i hope now is more clear
    Thanks in advance

    Leave a comment:


  • Scott Klement
    replied
    Java doesn't use a library list. Can you be more specific about what you're trying to do?

    Leave a comment:


  • gio.cot
    started a topic How set libray list in runjava

    How set libray list in runjava

    Hi all

    I have a CL program that set the library list and then execute runjava
    command to run a java pgm; when run the java pgm, the library list is not
    setted like in caller job . question : which is the best way to set the
    library list in the (like that i have in te caller job ) in called job ?

    Thanks in advance

    Gio​
Working...
X