please help me out ASAP... i am trying to execute a jar file through this program in eclipse but it's showing an error - createprocess=5 access is denied and i tried to change the permissions of respective folders and directory but couldn't work and i made changes in configuration file of eclipse i.e eclipse.ini but still i am facing prob.
Are you sure that your "java" executable is located in C:\Users\x\Desktop? Because that's what you're trying to do here (apart from the space).
I think you want to execute "java -jar helol.jar" from directory C:\Users\x\Desktop. There's an overloaded exec method for that:
And when you're working with Runtime.exec or ProcessBuilder, make sure to have read When Runtime.exec() won't.