I need to start a server using bash, so I had created an UNIX shell , but I am not able to execute it with Java from Eclipse.
I tried the following code which doesn't work :
Process proc = Runtime.getRuntime().exec(./startServer);
Here is content of the startServer file :
#!/bin/bash
cd /Users/sujitsoni/Documents/bet/client
npm start
"./startServer"the script must be in the same directory as the current java directory. This can be a bit hard to guess depending on how you start it (In case of Eclipse it is most likely the project root). I would use an absolute ath to the script instead.