Calling external scripts
String fileips=null;//all the paths
String[] Files=null;
String fileip=null;//Single Path
try {
InputStream is = Thread.CurrentThread (). Getcontextclassloader (). getResourceAsStream ("pdfconfig.properties"); Load thread file becomes stream
Properties prop = new properties ();
Prop.load (IS);
Fileip = Prop.getproperty ("Pdf_javatobatfile");
System.out.println ("CCCC" + Fileip);
Files=fileip.split (",");
System.out.println ("Length:" + files.length);
} catch (IOException e) {
E.printstacktrace ();
}
for (int j=0;j<files.length;j++) {
FILEIP=FILES[J];
String Filename=fileip+file.separator;
File F=new file (fileName);
System.out.println (f);
if (f!=null) {
if (F.isdirectory ()) {
File[] Filearray=f.listfiles ();
if (filearray!=null) {
for (int i = 0; i < filearray.length; i++) {
try {
Thread.CurrentThread (). Sleep (5000);
} catch (Interruptedexception e) {
E.printstacktrace ();
}
Recursive invocation
Call bat script with popup window
try {
Runtime.getruntime (). EXEC ("cmd.exe/c start" +filearray[i]);
} catch (IOException e) {
E.printstacktrace ();
}
}
}
}
else{
System.out.println (f);
}
}
}
All bat scripts in the calling file in Java