I tried to run the batch file from java code, bat file is running but in bat file internally it is calling proxyServer.js file.This .js file is not running. Below is the sample code.
try {
String path="cmd /c start C:\\AxoneES_Viewers_Integration-2016Q3-SNAPSHOT_201609021003\\AxoneViewers.bat";
Runtime rn=Runtime.getRuntime();
Process pr=rn.exec(path);
} catch(IOException ex) {
System.out.println("Exception Found");
}
As i mentioned internally it is calling .js file where they declared path of the .js file, below is the code , which declared the path. cd viewers\apps\maxq\ node proxyServer.js
while running the bat file it is not able to find the path of .js file and it not running.
Can you help me is there any approach to execute the bat file from java.