Is there anyway to detect if you are running in the IDE?
Similar to this in VB
http://www.vbforums.com/showthread.php?t=231468
Printable View
Is there anyway to detect if you are running in the IDE?
Similar to this in VB
http://www.vbforums.com/showthread.php?t=231468
I'm guessing it would depend on the IDE.
Thats why VB is better than Java ;)
I'm using Intellij IDEA.
It's not needed in my app anymore, but I am interested if it is possible.
Would it even be possible?
What with Java compiling the source first?
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.