[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5448) CONTRIB: Java slapd



This is a multi-part message in MIME format.
--------------070904040708010009080404
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hyc@OpenLDAP.org wrote:
> Full_Name: Howard Chu
> Version: 0.0.1
> OS:
> URL: ftp://ftp.openldap.org/incoming/jslapd.tgz
> Submission from: (NULL) (76.91.220.157)
> Submitted by: hyc

For completeness sake, here's the source code... ;)
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

--------------070904040708010009080404
Content-Type: text/x-java;
 name="jslapd.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="jslapd.java"

/*
 * Java wrapper for slapd
 */
import java.util.*;
import java.io.*;

class jslapd {
	public static void main(String[] args) {
		args[0] = args[0].concat("/slapd");
		try {
			Process p = Runtime.getRuntime().exec(args);
			InputStream stderr = p.getErrorStream();
			InputStreamReader isr = new InputStreamReader(stderr);
			BufferedReader br = new BufferedReader(isr);
			String line = null;
			while ((line = br.readLine()) != null)
				System.out.println(line);
			p.waitFor();
		} catch (Throwable t)
		{
			t.printStackTrace();
		}
	}
}

--------------070904040708010009080404--