Click here to Skip to main content
15,920,005 members
Home / Discussions / Java
   

Java

 
Questionhelp me Pin
tidelgl24-Apr-09 7:07
tidelgl24-Apr-09 7:07 
QuestionComparable Pin
jonig1923-Apr-09 18:21
jonig1923-Apr-09 18:21 
AnswerRe: Comparable Pin
Cedric Moonen23-Apr-09 21:15
Cedric Moonen23-Apr-09 21:15 
QuestionHow To get frame in video Pin
Flying_Doc23-Apr-09 6:17
Flying_Doc23-Apr-09 6:17 
QuestionHow to make Array of record in JavaScript Pin
novhard22-Apr-09 23:36
novhard22-Apr-09 23:36 
AnswerRe: How to make Array of record in JavaScript Pin
novhard23-Apr-09 18:45
novhard23-Apr-09 18:45 
QuestionGet thumbnail from file, Shell32? Pin
Klazen22-Apr-09 9:40
Klazen22-Apr-09 9:40 
QuestionHow to execute batch in java Pin
cofi++21-Apr-09 6:04
cofi++21-Apr-09 6:04 
hi i have written this code to execute a batch file in windows 2003 server R2
but it does not execute anything. it opens the cmd.exe window and does nothing also
the "Exit Value" and "Return Code" is 0.
can anyone help me about this?
is there any windows registry setting to restrict the execution of batch files programatically?

Thank you!!!!

try
{
Runtime runtime = Runtime.getRuntime();
Process process = null;
try
{
System.out.println( "Running: " + fName + ".bat " );
process = runtime.exec( "cmd /c start " + fName + ".bat" );

int returnCode = process.waitFor();
System.out.println("Exit value " + process.exitValue());
System.out.println("Return code value " + returnCode);
System.out.println("Finished running the SQL Loader script's process. " + " Exit Value = " + ( returnCode == 0? "Success" : "Failure" ) );
}
catch ( Exception e )
{
System.out.println(e.getMessage());
e.printStackTrace();
}

}
catch ( Exception e )
{
System.out.println( "Error running the sqlldr script: " + e );
e.printStackTrace();
}
AnswerRe: How to execute batch in java Pin
Marc Firth22-Apr-09 1:54
Marc Firth22-Apr-09 1:54 
AnswerRe: How to execute batch in java Pin
Marc Firth22-Apr-09 1:56
Marc Firth22-Apr-09 1:56 
GeneralRe: How to execute batch in java Pin
cofi++22-Apr-09 3:58
cofi++22-Apr-09 3:58 
GeneralRe: How to execute batch in java [UPDATED] [modified] Pin
Marc Firth22-Apr-09 4:06
Marc Firth22-Apr-09 4:06 
QuestionJava, Eclipse & Visual Editor Pin
Marc Firth20-Apr-09 22:28
Marc Firth20-Apr-09 22:28 
QuestionNoob question Pin
jharker198719-Apr-09 7:11
jharker198719-Apr-09 7:11 
AnswerRe: Noob question Pin
fly90419-Apr-09 8:17
fly90419-Apr-09 8:17 
GeneralRe: Noob question Pin
jharker198719-Apr-09 8:48
jharker198719-Apr-09 8:48 
GeneralRe: Noob question Pin
fly90419-Apr-09 9:56
fly90419-Apr-09 9:56 
QuestionHuffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 4:35
novhard19-Apr-09 4:35 
AnswerRe: Huffman coding in Java Script Encoding Decoding Pin
MikeMarq19-Apr-09 5:13
MikeMarq19-Apr-09 5:13 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 6:33
novhard19-Apr-09 6:33 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
MikeMarq19-Apr-09 8:20
MikeMarq19-Apr-09 8:20 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 18:39
novhard19-Apr-09 18:39 
GeneralRe: Huffman coding in Java Script Encoding Decoding [modified] Pin
MikeMarq20-Apr-09 6:37
MikeMarq20-Apr-09 6:37 
GeneralThe code Pin
MikeMarq20-Apr-09 6:41
MikeMarq20-Apr-09 6:41 
GeneralThe encripted file Pin
MikeMarq20-Apr-09 6:43
MikeMarq20-Apr-09 6:43 

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.