This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
It's easy: start 2 jvm's and in 1 call System.exit(). See what happens.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Robin John wrote:what to do if your girlfriend is waiting for you and you want to know the answer
I certainly wouldn't post it to a messages board and wait possibly hours for someone to reply.
;-)
now Fred, I was expecting a no reply or a answer to the above before I left with her... anyways.. another reason was.. start my system where java is installed write a couple of codes and start..
Wouter Oet wrote:
It's easy: start 2 jvm's and in 1 call System.exit(). See what happens.
and yes.. the one who invokes it dies.. the other runs...
Based on the responses so far from Robin (or is it John) I am bound to get castigated for this posting.
What a silly question. Apart from the fact that it would take 20 seconds to test by writing two very very simple Java programs and call System.exit() in one of them, why would it make sense for one Java program to be able to call System.exec() and close all other Java programs that are running? If I was using Netbeans, which is written in Java, to develop Java programs and I called System.exit() inside one of my programs I would be a little ****ed off if it closed down Netbeans!
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
James Sabre wrote:....What a silly question. Apart from the fact that it would take 20 seconds to test by writing two very very simple Java programs and call System.exit() in one of them...
20 seconds or even less.. if you are sitting next to your system, having a ide/textpad, jdk installed... as I have already stated before...
James Sabre wrote: Based on the responses so far from Robin (or is it John) I am bound to get castigated for this posting.
some people get castigated often and easily... try this .
James Sabre wrote:....What a silly question. Apart from the fact that it would take 20 seconds to test by writing two very very simple Java programs and call System.exit() in one of them...
20 seconds or even less.. if you are sitting next to your system, having a ide/textpad, jdk installed... as I have already stated before...
So you interacted with this site using what?
James Sabre wrote: Based on the responses so far from Robin (or is it John) I am bound to get castigated for this posting.
some people get castigated often and easily... try this .
It seems that you need meditation far more than I do. I cool man.
The point of my previous response was to indicate that it was illogical for System.exit() to close down all JVM instances. But hey - it's no skin off my nose if you just want to ignore the obvious and to waste your time asking a question on these forums that can be rapidly answered by simple experimentation.
Bye
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.