Error on executing exe from java -


`i have written below code running exe presently ran through windows service. want call java program. getting below error in image. dont know how go through installutil or debug error. please me on this.

` enter image description here

import java.io.*;  public class exec {     public static void main(string[] args)throws exception {         try {             string cmd = "d://oglwindowsservice//ogl_21052014//ogl_25_feb_2015//oglservice.exe";             runtime run = runtime.getruntime();             process pr = run.exec(cmd);          }         catch(exception ex) {             system.out.println(ex.getmessage());         }     } } 

you have answer question in first screen. windows tells program designed service , not run command line. suggests use insyalutil set program service , windows run when need it. ususally service runs events. common - user connects particular port associated service (for example port 80) , when such request occurs windows starts service progarm (iis answer http call) , delegate request new program. or delegeates if program running.

so, can see, windows in charge of service programs. cannot start them command line of process (that's example). can start/stop/restart process manually in service control window that's still not command line or process.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -