CIB runShell technischer Leitfaden

Schneller Einstieg

Aufrufbeispiel der CIB runshell über ein Script aus Java

import java.lang.Runtime;
import java.io.*;
import java.lang.*;

public class ScriptExec {

    public static void main(String[] args){
    	System.out.println("start");
    // TODO implement Main.main
    	Runtime t_RunTime = Runtime.getRuntime();
    	if (t_RunTime != null)
    	{
	    	String[] t_cmdarray = new String[2];
		//Angabe das aufzurufenden Scripts
	    	t_cmdarray[0] = new String("./TestScript.sh");
		//Argument fuer das Script mit Leerzeichen
	    	t_cmdarray[1] = new String("DocInfo.Author=CIB support Team");
	    	
	    	try
	    	{
	    		//Script starten	
			Process t_Process = t_RunTime.exec(t_cmdarray);
			int t_Result = t_Process.waitFor();
		}
	    	catch (IOException exec)
	    	{
	    		System.out.println("IOException");
	   		exec.printStackTrace(); 
		}
		catch (InterruptedException interexec)
		{
			System.out.println("InterruptedException");
                        interexec.printStackTrace();	
		}
    	}
    }
}

ScriptExec.java

#/bin/sh
LD_LIBRARY_PATH=. ./cibrshux "$1" -f input.rtf output.pdf

TestScript.sh aus Linux/Unix