Skip to main content

Basic Beginner Help

1 reply [Last post]
Joined: 2007-07-25
Points: 0


In Windows, in a command prompt, is there a way to capture error messages generated when running a Java class file, using the syntax >java MyDemo.class?

I've tried piping it into a text file using >java MyDemo.class > error.txt
but this creates an empty error.txt file.

Essentially I want to be able to paste the error into a forum post.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-07-08
Points: 0

Can't you just click the icon (top left) and pick mark? then highlight what you want and copy?

Anyway, I can write output like this:
prompt> java MyDemo > junk.jnk

If you put in the MyDemo.class it is trying to us it as a definition. Leave off the .class when you want to run it.