I am doing
Process p = null;
if(CheckOS.isWindows())
p = rt.exec(filebase+port+"/hlds.exe +maxplayers "+players+ " -game cstrike -console +port "+port+" -nojoy -noipx -heapsize 250000 +map de_dust2 +servercfgfile server.cfg +lservercfgfile +mapcyclefile mapcycle.txt +motdfile motd.txt +logsdir logs -zone 2048",null, new File(filebase+port)) ;
and want to store p in database but process is not serializable, how to save it in database??
and can we check if process p is still running or died due to some crash or something
You definitely cannot store a Process itself in a database. But if you are trying to keep processes around for future use (within the scope of the VM), then you can have something like this:
You can store and lookup from wherever (within the confines of your classloader) using
etc.