Timeline for Command from java program
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 10, 2012 at 20:35 | review | Close votes | |||
| Mar 1, 2013 at 3:02 | |||||
| Jul 2, 2012 at 8:47 | vote | accept | agarwav | ||
| Jul 2, 2012 at 8:45 | comment | added | David Kroukamp | The code works fine for me? output being: Volume in drive C has no label. Volume Serial Number is CC8C-8FCE Directory of C:\Users\David\Documents\NetBeansProjects\Command 2012年07月02日 10:43 AM <DIR> . 2012年07月02日 10:43 AM <DIR> .. 2012年07月02日 10:43 AM <DIR> build 2012年07月02日 10:43 AM 3�716 build.xml 2012年07月02日 10:43 AM 85 manifest.mf 2012年07月02日 10:43 AM <DIR> nbproject 2012年07月02日 10:43 AM <DIR> src 2 File(s) 3�801 bytes 5 Dir(s) 92�880�769�024 bytes free Done | |
| Jul 2, 2012 at 8:42 | answer | added | Nir Alfasi | timeline score: 2 | |
| Jul 2, 2012 at 8:40 | comment | added | Joost |
Well, 'doing nothing' is very different from 'looping indefinitely'. If it is not giving output it's probably not in the loop (because the loop prints). It's probably stuck at the first readLine(), waiting for input or waiting at the waitFor(). Related question was answered here: stackoverflow.com/questions/8149828/…, it has the waitFor() after the loop
|
|
| Jul 2, 2012 at 8:35 | comment | added | agarwav | means it's doing nothing! It is just trapped in an infinite loop and not giving any output. | |
| Jul 2, 2012 at 8:31 | comment | added | KV Prajapati |
Compile it >javac Command.java -d . and Run it from command prompt >java src.Command
|
|
| Jul 2, 2012 at 8:31 | comment | added | Joost |
What do you mean by 'not able to execute'? What is the console output when you run this? It's also possible that it's running but that an exception is thrown. You are not doing anything with exceptions. Add a e1.printStrackTrace(); in the exception blocks to see whats wrong
|
|
| Jul 2, 2012 at 8:28 | history | asked | agarwav | CC BY-SA 3.0 |