Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

java applet debugging

Thread view: 
Angus - 21 Nov 2006 15:15 GMT
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
Jan Thomä - 21 Nov 2006 15:34 GMT
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

> 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

Signature

__________________________________________________________
insOMnia - We never sleep...
http://www.insomnia-hq.de

Angus - 21 Nov 2006 16:42 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> Best regards,
> Jan

Thanks didn't know about that.  And I see you can use System.out to print
debug output to this console?
Angus - 21 Nov 2006 16:46 GMT
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

> Hi,
>
[quoted text clipped - 16 lines]
> insOMnia - We never sleep...
> http://www.insomnia-hq.de
Daniel Pitts - 21 Nov 2006 18:19 GMT
> 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
[quoted text clipped - 17 lines]
> > Best regards,
> > Jan

You could also use appletviewer.
Andrew Thompson - 21 Nov 2006 21:34 GMT
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.
Andrew Thompson - 21 Nov 2006 23:38 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.