Click here to Skip to main content
15,890,123 members
Home / Discussions / Java
   

Java

 
Questionthread does not return from Runtime.exec Pin
WernerP19-Jan-11 1:55
WernerP19-Jan-11 1:55 
AnswerRe: thread does not return from Runtime.exec Pin
Peter_in_278019-Jan-11 12:31
professionalPeter_in_278019-Jan-11 12:31 
GeneralRe: thread does not return from Runtime.exec Pin
WernerP19-Jan-11 12:52
WernerP19-Jan-11 12:52 
GeneralRe: thread does not return from Runtime.exec Pin
Peter_in_278019-Jan-11 13:07
professionalPeter_in_278019-Jan-11 13:07 
GeneralRe: thread does not return from Runtime.exec Pin
WernerP19-Jan-11 23:27
WernerP19-Jan-11 23:27 
GeneralRe: thread does not return from Runtime.exec Pin
WernerP20-Jan-11 6:32
WernerP20-Jan-11 6:32 
QuestionAbout Calculate.... Pin
Khalil Adam19-Jan-11 0:45
Khalil Adam19-Jan-11 0:45 
AnswerRe: About Calculate.... lt compiles but the calculating is always false......could someone help me to correct this code..... Pin
Cedric Moonen19-Jan-11 1:35
Cedric Moonen19-Jan-11 1:35 
Please consider the following points:
1) Put your question inside the body of the message and keep a concise but precise title
2) Use the "code block" button to format your code so that it is readable
3) Provide the information which is required for us to understand the problem (in your case, what you are getting and what you were expecting). How can we guess what you had in mind when writing your code ?

Related to your question: there are a couple of points which are wrong in your code.
1) You have three consecutive lines in which you assign a value to ans (num1+num2, num1-num2, num1/num2). Only the last value will be kept, since the other ones will be overriden (so, what's the point of having those lines anyway ?)
2) The sign variable is never used
3) If you don't fall in the first if, then you are using the num1 and num2 variables which are not initialized.
4) In the different else, you check for args[1], then args[2], then args[3] for the type of operation to execute. I would guess that it is always at the same position (args[1]).

I suggest that you read some basic tutorial about java because it seems you are confused about some fundamental concepts.
Cédric Moonen
Software developer

Charting control [v3.0]
OpenGL game tutorial in C++

GeneralRe: About Calculate.... Pin
Khalil Adam19-Jan-11 2:31
Khalil Adam19-Jan-11 2:31 
GeneralRe: About Calculate.... lt compiles but the calculating is always false......could someone help me to correct this code..... Pin
Cedric Moonen19-Jan-11 2:59
Cedric Moonen19-Jan-11 2:59 
GeneralRe: About Calculate.... Pin
Khalil Adam19-Jan-11 3:10
Khalil Adam19-Jan-11 3:10 
GeneralRe: About Calculate.... lt compiles but the calculating is always false......could someone help me to correct this code..... Pin
Richard MacCutchan19-Jan-11 3:14
mveRichard MacCutchan19-Jan-11 3:14 
GeneralRe: About Calculate.... Pin
Khalil Adam19-Jan-11 3:26
Khalil Adam19-Jan-11 3:26 
GeneralRe: About Calculate.... Pin
Cedric Moonen19-Jan-11 3:29
Cedric Moonen19-Jan-11 3:29 
GeneralRe: About Calculate.... Pin
Khalil Adam19-Jan-11 3:45
Khalil Adam19-Jan-11 3:45 
GeneralRe: About Calculate.... Pin
Cedric Moonen19-Jan-11 3:58
Cedric Moonen19-Jan-11 3:58 
GeneralRe: About Calculate.... Pin
Khalil Adam19-Jan-11 4:14
Khalil Adam19-Jan-11 4:14 
GeneralRe: About Calculate.... Pin
Richard MacCutchan19-Jan-11 5:19
mveRichard MacCutchan19-Jan-11 5:19 
GeneralRe: About Calculate.... Pin
TorstenH.19-Jan-11 22:20
TorstenH.19-Jan-11 22:20 
Generalthanks Cedric, Pin
Khalil Adam20-Jan-11 1:57
Khalil Adam20-Jan-11 1:57 
GeneralAbout Calculate.... Pin
Khalil Adam20-Jan-11 3:06
Khalil Adam20-Jan-11 3:06 
Questionwhat does this errors means? Pin
pancakeleh18-Jan-11 19:54
pancakeleh18-Jan-11 19:54 
AnswerRe: what does this errors means? Pin
TorstenH.18-Jan-11 20:38
TorstenH.18-Jan-11 20:38 
General[THEORETICAL] Layering I/O streams Pin
shpid3r18-Jan-11 6:58
shpid3r18-Jan-11 6:58 
GeneralRe: [THEORETICAL] Layering I/O streams Pin
TorstenH.18-Jan-11 20:40
TorstenH.18-Jan-11 20:40 

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.