Not really. You could use some platform-specific code, perhaps, to find the parent process of the current virtual machine and query what that is.
However, doing so would be a grave mistake, and I would consider the near impossibility of it a feature of Java, not a shortcoming. A program that behaves differently when launched from the IDE than when launched directly ... I don't want to even begin to imagine the horrors that would mean for testing, debugging and general correctness.
All the buzzt CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.