Java - Use Command Prompt to Debug GUI Program

Just wondering if anyone knows how to get Command Prompt to help as a debugger for a GUI program. The book I have does not explain how to set this up. It gives an example, but it does not describe how to go about doing this. I’m using a Starting Out with Java - Early Objects (Fourth Edition) if it helps/matters.

Like, I can export a JAR file with BlueJ, but it doesn’t show or bring up Command prompt even though there’s System.out.println methods being used and called.

Any ideas?

I got it. Gotta write this shit down.

Good for nothing piece of shit made in fucking actual what the fuck man.

It’s essentially, “How to run a Java program in/through Command Prompt”.

  1. Open Command Prompt and change directory to the location of the Java file that you want to run.
    “cd C:\Users\X\Desktop\Y”

(X = the account logged in to Windows)
(Y = the folder that the Java file is in)

  1. Then type “Java Z”
    Z = the name of the Java file you want to run.

The program should run from there.

1 Like

I was just about to answer this. Your IDE does not allow you to setup a console for debugging in real time?

1 Like

I was trying to get it to work without one like my book shows.
Just trying to follow along with the guide.
The IDE will do it, but for externally with JRE programs it’s good to know.

1 Like

If your still looking for an actual terminal based debugger I would checkout jdb.