Phoebe
Phoebe

Reputation: 2824

How do I open a Java console for an application already running?

I'm not sure if this is possible or not, but I have an application running that has failed in an unusual way, and I now want to see the console. Is it possible to open the Java console once an application is already running? If so, how (on Windows 7)?

Upvotes: 1

Views: 790

Answers (3)

Chris Aldrich
Chris Aldrich

Reputation: 1922

Agree with AlexR. I would use something like log4j to do your logging. Saves a LOT of hassle.

Upvotes: 1

Adel Boutros
Adel Boutros

Reputation: 10285

I don't think you can.

What you can do is run your application from the Command Prompt and check for the errors appearing.
The best solution is to try to run your application from Eclipse or Netbeans so you can have a better understanding of the error causing your application to fail.

PS: Eclipse and Netbeans are free to use.

Upvotes: 0

AlexR
AlexR

Reputation: 115328

If your application does not have console on windows it was executed using javaw that does not have console by definition.

Try to use logs or JMX to debug your problem.

Upvotes: 0

Related Questions