Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java code to launch shell script with arguments

String cmd= "./copyFile.sh file1Name file2Name" ; // Path to Script and paramters $1 $2 used inside the script
ProcessBuilder pb = new ProcessBuilder(cmd. split(" ")); 
Process pr = pb.start();
Source by www.javasavvy.com #
 
PREVIOUS NEXT
Tagged: #Java #code #launch #shell #script #arguments
ADD COMMENT
Topic
Name
5+1 =