Eden Morris Posted December 1, 2010 Posted December 1, 2010 (edited) Am I not understanding how "Run Shell Script ( shellScript )" should work under windows? I put in "echo hello world" and I got errors. I then put in ipconfig and filemaker froze completely is there more to this command than I think? Note: I'm on window 7 64-bit if that makes a difference. Below is the error for the echo: java.io.IOException: Cannot run program "echo": CreateProcess error=2, The system cannot find the file specified Parameters: {shellScript=echo Hello} ---Script--- Script: String[] commands = tokenize( shellScript ); Process process = Runtime.getRuntime().exec( commands ); process.waitFor(); exitValue = process.exitValue(); outputResult = process.getInputStream().getText("utf-8"); errorResult = process.getErrorStream().getText("utf-8"); if (exitValue != 0) throw new Exception(errorResult); return outputResult; public static String[] tokenize( String input ) { input = input.trim(); String token, nextDelim = "t ""; StringTokenizer st = new StringTokenizer(input, nextDelim, true ); List result = new LinkedList(); while( st.hasMoreTokens() ) { String lastValue = ""; while( true ) { //Loop until a word is found token = st.nextToken( nextDelim ); if( """.equals( token ) ) { if( """.equals( nextDelim ) ) break; //This is the closing quote else nextDelim = """; //This is the opening quote } else if( " ".equals( token ) || "t".equals( token ) ) { if( lastValue.length() > 0 ) break; } else if( "".equals( token ) ) { i... Edited December 1, 2010 by Guest
Recommended Posts
This topic is 5105 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now