midrange.com code scratchpad
Name:
Routine to set QZRCSRVS library list based on java.library.path
Scriptlanguage:
Java
Tabwidth:
4
Date:
02/07/2008 05:49:38 pm
IP:
Logged
Description:
The user was to lazy to give a description
Code:
  1.     private void setupLibraryList(AS400 as400) 
  2.         throws AS400SecurityException, ErrorCompletingRequestException, 
  3.         IOException, InterruptedException, PropertyVetoException {
  4.         String libraryProperty = System.getProperty("java.library.path");
  5.         
  6.         StringBuffer cmd = new StringBuffer();
  7.         cmd.append("CHGLIBL LIBL(");
  8.         
  9.         String[] pathEntries = libraryProperty.split(":");
  10.         for (int i=0;i<pathEntries.length;i++) {
  11.             QSYSObjectPathName path = new QSYSObjectPathName(pathEntries[i]);
  12.             String library = path.getObjectName();
  13.             cmd.append(library);
  14.             cmd.append((i < pathEntries.length-1) ? " " : "");
  15.         }
  16.         cmd.append(")");
  17.         
  18.         CommandCall cc = new CommandCall(as400);
  19.         cc.run(cmd.toString());
  20.     }
  21.  
© 2004-2019 by midrange.com generated in 0.007s valid xhtml & css