Hey all, I'm trying to get an alternative to cfexecute working and I'm wondering how to loop with a call to BufferedReader.readLine().
Here's the code: <cfset runtime = CreateObject("java", "java.lang.Runtime")> <cfset process = runtime.getRuntime().exec(cmd)> <cfset errStream = process.getErrorStream()> <cfset errInputStreamReader = CreateObject("java", "java.io.InputStreamReader").init(errStream)> <cfset bufferedErrRead = CreateObject("java", "java.io.BufferedReader").init(errInputStreamReader)> <cfloop from="1" to="20" index="line"> <cfset err &= bufferedErrRead.readLine() & Chr(13) & Chr(10)> </cfloop> The loop is hardcoded to run 20 times, but what I really need is to be able to do something like: while bufferedErrRead.readLine() != null Any ideas on how to do a check for a Java null in CF? Cheers. Adrian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325144 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4