Thanks,<br />Vlad
Please ignore post, I have no idea what I am talking about.
Originally posted by christopher foran:
I just wrote some code that did that. I was trying to make a unique ID with the pid of the JVM as one of the attributes. You need to write a small c/c++ program that does "getpid()" and than use JNI to call it.
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Originally posted by Michael Ernest:
The easiest way to get the PID is through the shell environment variable $$. Use a System.exec() call to "echo $$"
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Originally posted by Michael Ernest:
I don't know the Heath Robinson reference but I get what you're saying.
Scott Arrowood wrote:Joe, While I agree about waking zombies, All seven years of info is beneficial to those of us who happen to be looking for it the first time. Thanks for the help guys.
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Emilia con wrote:If I get a process object in Java through Runtime.getRuntime().exec(...), or ProcessBuilder.start(), I can wait for it through Process.waitFor(), which is like Thread.join(), or I could kill it with Process.destroy(), which is like the deprecated Thread.stop(). BUT: How do I find the pid of the Process Object? I don't see a method for doing that in The Official Documentation. Can I do this in Java? If so, how?
Duc's blog: http://ducquoc.wordpress.com
Don't get me started about those stupid light bulbs. |