W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 1997

System.exit in tutorial resource

From: Art Rothstein <art@mojo-working.com>
Date: Tue, 11 Mar 1997 20:05:58 -0800
Message-Id: <3.0.32.19970311200418.006ca1d8@pop.sirius.com>
To: Jigsaw Mailing List <www-jigsaw@w3.org>
The System.exit call in the FancyResource source seems a harsh way to
respond to an error, especially when that error is likely to be committed
by dumber newbies, such as I, using the sample code.

In my case, I renamed the "tutorials" directory to "tutorial" to
accommodate the many prehistoric utilities I still use that do not
recognize long file names.  As a newbie I had no idea that the string
passed to Class.forName had to match the class' package name.  While trying
to figure out where to place the class, I commented out the package
statement and placed the class in \JAVA\LIB.  The configuration screen
found the resource, failed the Class.forName call, and took down the
server.  The cause and effect might have been easy to find had I not run
the JAVAW version of the JVM, which suppresses all console messages.

Now wiser, I won't make this mistake again, at least not very often.
Still, putting such System.exit code in a sample application that is likely
to be copied, is a bad idea.  I betray my ignorance of Java by not knowing
whether there is a better way of preventing the malformed class from loading.

-----
McKinley Systems
San Francisco
415-399-9933
http://www.mojo-working.com
Received on Tuesday, 11 March 1997 23:06:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT