Re: Understanding this error list




Steve W. Jackson wrote:
In article <1161890681.718055.286850@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Andrew Thompson" <andrewthommo@xxxxxxxxx> wrote:

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.

What Hasan said and you seconded isn't really valid for Mac OS 9.2.2
since it's an OS that has no kind of command line interface at all.

Also, any Mac running Mac OS 9.2.2 is most probably *not* running Java
1.0.2. The Macintosh Runtime for Java that was included with the last
versions of the Mac OS prior to the advent of OS X should be at least
1.1.x. The highest available version supported is 1.1.8. With some
trickery, it was possible to get Swing 1.1.1 via a swingall.jar file,
but it was decidedly *not* pretty.

Just to be sure, the OP should get MRJ 2.2.5, which is available at
<http://docs.info.apple.com/article.html?artnum=75097>. (MRJ 2.2.6 is
at <http://docs.info.apple.com/article.html?artnum=120209>, but it's not
needed unless it's to support HTTPS and Oracle 11i.) That page on 2.2.5
gives information on installation and other matters.

Better still would be to leave Mac OS 9.2.2 in the dust, since it's now
officially dead, and move on to OS X and modern Java.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama

Hi All,
I will make this iBook a door stop. I will further recommend that my
local library burn java books older than 3 years for heating the
building during the winter months ahead. And I will further recommend
that if a CD is included with the outdated Java book, that it should
be run over by the bookmobile.

Thanks to all of you.

bH

P.S. I have a Win2K with NT that I use to do my Java programming. I use
jdk1.5.0_05 and
was taking time to investigate a bit of "retro" with theJava and the
iBook.

.



Relevant Pages