I'm having some problems with getting the .getruntime.exec() to work properly. Here is the code dealing with that part:
while (line != null)
{
String name = line;
String commandFull = commandFirst + name + commandLast;
String[] fullCommand = new String[] {commandFirst, name, commandLast};
for(int i=0;i<3;i++)
{
System.out.print(fullCommand[i]);
}
Runtime runner = Runtime.getRuntime();
Process p = runner.exec(fullCommand);
outFile.println(fullCommand);
line = inFile.readLine();
}
It prints out the command as it should look. When I run the program here is the output:
adfind -b dc=stuff,dc=com -f "cn=user" |find "displayName" >> fullList.txt
Exception in thread "main" java.lang.IllegalArgumentException
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at lookup.main(lookup.java:41)
Thanks for the help.