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: <>
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
Received on Tuesday, 11 March 1997 23:06:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:22 UTC