java applet debugging

A

Angus

I am writing a Java applet and all is working so far ok. But all sorts
things can go wrong and I want to be able to say switch on a debug option
and write debugging information somewhere. I believe I cannot write to a
file with an applet. How can I somehow output debug information?

Angus
 
J

Jan =?ISO-8859-1?Q?Thom=E4?=

Hi,

you can use logging and have output logged to the Java console which is
offered by any Java Plugin for Browsers. Rightclick the Small Java Icon in
the Taskbar and select "Java Console", to see your debugging output.

Best regards,
Jan
 
A

Angus

Jan Thomä said:
Hi,

you can use logging and have output logged to the Java console which is
offered by any Java Plugin for Browsers. Rightclick the Small Java Icon in
the Taskbar and select "Java Console", to see your debugging output.

Best regards,
Jan

Thanks didn't know about that. And I see you can use System.out to print
debug output to this console?
 
A

Angus

I want to check that my applet destroy function is working correctly. But
the Java console closes when my web page closes. Is there any way round
this? can I get the console to eg dump to a file? I couldn't see anything
like this in the options
 
D

Daniel Pitts

Angus said:
I want to check that my applet destroy function is working correctly. But
the Java console closes when my web page closes. Is there any way round
this? can I get the console to eg dump to a file? I couldn't see anything
like this in the options

You could also use appletviewer.
 
A

Andrew Thompson

Angus wrote:

Please refrain from top-posting Angus.
I want to check that my applet destroy function is working correctly.

It makes little difference if it is. It is the browser itself
that invokes the stop()/destroy() behaviour, and they
often cannot be relied upon, to do so.

Andrew T.
 
A

Andrew Thompson

Angus said:
I am writing a Java applet and all is working so far ok.

As an aside, if I am developing anything beyond
the most trivial of applets, I will write a little
'main()' that launches it in a frame.

It can make development far quicker, up to
a particular stage, depending on the needs
of the applet (applet contexts are harder
to implement, and for JS support..).

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top