Re: Understanding this error list
bH wrote:
....
I have this program in an iBook, Mac OS 9.2.2 with Java 1.0.2.
What Hasan said, but also..
Why are you using such an *old* Java?
I note that even the applet viewer mentioned in the
stacktrace says 'JMAppletViewerOld' - do you have
a 'JMAppletViewerNew' on that system?
...And 1.0.2 - wow! I have never manged to find either
documentation on, or an rt.jar for, a '1.0' java ..how
big is the 'rt.jar' (or Mac equivalent)?
Oh, before I forget, the reason I noticed the Java
version was because of that very deprecated code
you posted. That is not a good book to be copying
from, as you will need to 'unlearn' a lot of what you
seem to be picking up.
&....
try {
getAppletContext().showDocument(new URL(textFld.getText()));
}
catch (Exception e) {;}
Never 'swallow' exceptions*.
catch (Exception e) {
e.printStackTrace();
}
* unless you can justify in a comment, why this
exception absolutely does not matter.
Andrew T.