Calling a node.js script from java using ProcessBuilder in mac

I am very much new to mac and its directory structure.

I have a node.js script on my desktop and the path to it is: /Users/username/Desktop/webserver

I would like to run this script(Along with an argument) within java using ProcessBuilder in Mac OSX.

In windows using Runtime, i would do something like:

String [] env=null;
String[]callAndArgs= {"node","server.js",argument};

Process p = Runtime.getRuntime().exec(callAndArgs,env,
new java.io.File("Path to my server.js file"));

BufferedReader stdInput = new BufferedReader(new 
InputStreamReader(p.getInputStream()));//getting the input

BufferedReader stdError = new BufferedReader(new 
InputStreamReader(p.getErrorStream()));//getting the error

interface_name = stdInput.readLine();//reading the output

How can I accomplish the same in mac, as when I input the /Users/username/Desktop/webserver as path to my node.js script, I get an error saying

java.io.IOException: error=2, No such file or directory

Any help would be really appreciated.

Thanks a lot in advance.

Java is platform independent. So the Mac path should work without any trouble unless the java process doesn't have permission to access the file.

Make sure that the permissions are fine.