| 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: 
							
								
								
								| 
        private void setupLibraryList(AS400 as400) 
        throws AS400SecurityException, ErrorCompletingRequestException, 
        IOException, InterruptedException, PropertyVetoException {
        String libraryProperty = System.getProperty("java.library.path");
        
        StringBuffer cmd = new StringBuffer();
        cmd.append("CHGLIBL LIBL(");
        
        String[] pathEntries = libraryProperty.split(":");
        for (int i=0;i<pathEntries.length;i++) {
            QSYSObjectPathName path = new QSYSObjectPathName(pathEntries[i]);
            String library = path.getObjectName();
            cmd.append(library);
            cmd.append((i < pathEntries.length-1) ? " " : "");
        }
        cmd.append(")");
        
        CommandCall cc = new CommandCall(as400);
        cc.run(cmd.toString());
    }
  |  | 
				
					|  |