Whenever a program in command prompt crashes on Windows it closes so fast that I can't see the error message that is displayed in the prompt. Is there any way to prevent this behaviour?

There are two different situations where this occurs. One is when I open a program I downloaded from the Internet. This is solved by opening up a prom[t first (although it is a pain to have to open a prompt and type in the address of the application.

The other case is when I am using an IDE. I use a variety (Eclipse, Netbeans, Visual Studio, ect). Perhaps I should ask this part of the question on Stack Overflow?