Click here to Skip to main content
15,895,084 members
Home / Discussions / Java
   

Java

 
AnswerRe: java web aplication how to solve this problem Pin
Richard MacCutchan9-Dec-10 5:49
mveRichard MacCutchan9-Dec-10 5:49 
AnswerRe: java web aplication how to solve this problem Pin
TorstenH.9-Dec-10 21:49
TorstenH.9-Dec-10 21:49 
AnswerRe: java web aplication how to solve this problem Pin
Cedric Moonen9-Dec-10 22:29
Cedric Moonen9-Dec-10 22:29 
AnswerRe: java web aplication how to solve this problem Pin
Alok Sharma ji10-Dec-10 21:17
Alok Sharma ji10-Dec-10 21:17 
AnswerRe: java web aplication how to solve this problem Pin
Luc Pattyn11-Dec-10 0:34
sitebuilderLuc Pattyn11-Dec-10 0:34 
AnswerRe: java web aplication how to solve this problem Pin
RaviRanjanKr13-Dec-10 4:07
professionalRaviRanjanKr13-Dec-10 4:07 
QuestionHave anyone tried ajaxanywhere with JSP/Servlet Pin
Alok Sharma ji8-Dec-10 1:24
Alok Sharma ji8-Dec-10 1:24 
Questionhowto evaluate return values from windows process Pin
TorstenH.8-Dec-10 0:32
TorstenH.8-Dec-10 0:32 
Hey!

I'm setting up a tool which leaves my little "java world" and starts or stops some windows processes on a server.
Those processes do hand back some values about their state and various stuff:

SERVICE_NAME: servicename
        TYPE               : 10  WIN32_OWN_PROCESS  
        STATE              : 3  STOP_PENDING 
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x2710



The Code:
private boolean execCommand(final String strService, final String strCommand){
  try{
     Runtime rt = Runtime.getRuntime(); 
     Process oProcess = rt.exec("sc " + strCommand + " " + strService);
     return evaluateResult(oProcess);
  } 
  catch (IOException oException) {
     openErrorDialog("Service Command Error", 
	"The service " + strService + " could not be " + strCommand + "." );
	return false;
  }
}  

private boolean evaluateResult(final Process oProcess) throws IOException {

// evaluate the STATE of the process
  return true;
}



How do i react to this Confused | :confused:
Do I have to slice these Strings to get the STATE value - which will be a ugly mess?
Or is this the output of an object? is this return value standardized?

regards,
Torsten
I never finish anyth...

AnswerRe: howto evaluate return values from windows process [modified] Pin
TorstenH.8-Dec-10 1:47
TorstenH.8-Dec-10 1:47 
Questionpassing values across functions [modified] Pin
vidhyaej7-Dec-10 0:18
vidhyaej7-Dec-10 0:18 
AnswerRe: passing values across functions Pin
TorstenH.7-Dec-10 0:57
TorstenH.7-Dec-10 0:57 
GeneralRe: passing values across functions Pin
vidhyaej7-Dec-10 1:10
vidhyaej7-Dec-10 1:10 
GeneralRe: passing values across functions Pin
jschell7-Dec-10 10:20
jschell7-Dec-10 10:20 
GeneralRe: passing values across functions Pin
TorstenH.7-Dec-10 19:44
TorstenH.7-Dec-10 19:44 
AnswerRe: passing values across functions Pin
Richard MacCutchan7-Dec-10 11:17
mveRichard MacCutchan7-Dec-10 11:17 
Questionglassfish server 3 start failed ???? Pin
aa_zz6-Dec-10 21:06
aa_zz6-Dec-10 21:06 
AnswerRe: glassfish server 3 start failed ???? Pin
Luc Pattyn6-Dec-10 21:13
sitebuilderLuc Pattyn6-Dec-10 21:13 
AnswerRe: glassfish server 3 start failed ???? Pin
Alok Sharma ji7-Dec-10 1:30
Alok Sharma ji7-Dec-10 1:30 
AnswerRe: glassfish server 3 start failed ???? Pin
Skynet_Code7-Dec-10 20:55
Skynet_Code7-Dec-10 20:55 
AnswerRe: glassfish server 3 start failed ???? Pin
Spi-der23-Feb-11 1:42
Spi-der23-Feb-11 1:42 
QuestionEquivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) Pin
amarasat6-Dec-10 8:33
amarasat6-Dec-10 8:33 
AnswerRe: Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) Pin
David Skelly6-Dec-10 22:27
David Skelly6-Dec-10 22:27 
AnswerRe: Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) Pin
jschell7-Dec-10 10:22
jschell7-Dec-10 10:22 
GeneralRe: Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) Pin
amarasat7-Dec-10 11:57
amarasat7-Dec-10 11:57 
GeneralRe: Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) Pin
Skynet_Code7-Dec-10 21:49
Skynet_Code7-Dec-10 21:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.