Hi,
I am sorry if have posted this query in wrong thread!!!
How do i print the parameter in shell script which are passed from java programm?
i have tried in different ways.. but the actual param value is not printing when i execute the java programm
java code is here
import java.io.IOException;
public class TestShell {
/**
* @param args
*/
public static void main(String[] args) {
String inputFilePath=args[0];
String inputFileName=args[1];
String outputFileName=args[2];
String outputFilePath=args[3];
Runtime r = Runtime.getRuntime();
String[] cmdArray = new String[]{"Test.sh",inputFilePath, inputFileName, outputFileName, outputFilePath};
try {
r.exec(cmdArray);
System.out.println("Test.sh executed successfully.");
} catch (IOException e) {
e.printStackTrace();
}
}
}
I need a shell script to print paramenters (inputFilePath, inputFileName, outputFileName, outputFilePath)
Thanks,
Jasmin