Just answer part of your questions

jabber (jabber)
1) You know how to create a Thread using the Thread class.

2) A Java application itself is a Process on your native machine.

3) JVM can initiate a new (native) Process. The code is as follows

Process p = Runtime.exec(".....");

4) The title of your response is full of confusion. Let me cite it here--- How can I judge a running program is Process or Thread. The reason is that a running programm cannot be simply a Thread.

5) Whenever you talk about a Thread, please remember it means " a thread of control".

6) If you are really interested in hacking on the precise definitions, I suggest you pick up a book on Operating System. I guess you have one. As you browse the book, please pay attention to another term---task. Usually, people do a task in a seperate Thread.

7) Good luck.

2001-2-25 -04:00

回到话题: What's the difference between Thread and Process? It's said process is expensive and thread is much more efficient when I learn the difference between CGI and Servlet. tks.

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论