A Java Clock and Some Lossages
This page is part of a critique of EJBs, demonstrating that Java can be a bit of a moving target. Originally produced as a revision exercise in coding Java, the clock Applet demonstrates some lossages in older Java Virtual Machines (JVMs).
| A Java Clock |
The clock might not be telling the time very accurately, the guts of the program is the Calendar class, which is relatively new in Java. Sadly therefore the following lossages have been observed:
- Clock displays a random time:
- The Browser's Java implementation is ancient and can't get the time from the operating system correctly.
- Clock displays a random time (and doesn't update):
- The Browser's Java implementation is ancient and has a broken Calendar class.
- Clock displays the time, but is an hour out:
- The Browser's Java implementation is relatively modern, but is running on UNIX (or similar) and the Calendar class doesn't understand the concept of daylight savings time in the Time Zone Environment variable (in-spite of what the documentation says).
- Your Browser spits out something incomprehensible about an exception:
- The Browser's Java implementation doesn't understand a class invocation (probably the Point class). It is truly too ancient for the clock, you'll have to get your time some place else.
- Your Browser dies trying to display this page:
- Your Browser's Java implementation is so broken that it fails on startup and brings the Browser down with it. Let me guess: Netscape distributed with Red Hat Linux 6.0. You may have already figured that and switched Java off to view this page.
In these instances ancient is defined as that which is earlier than Java 1.1.4 or thereabouts. Mail Mr. OLTP if the clock did something different to the above in your Browser. We will add it to the above list (with an attribution if you wish).
A number of you out there (well, one at least) have asked to see the
Source Code for the Clock Applet. We're happy to publish it in the hope it may
encourage more Feedback.
Updates
Feedback has suggested that the following needed to be changed after this had been published:
- A Mobile Java Clock
- As you can probably tell, this was written prior to the turn of the century, "Java 1.1", antediluvian or what? Much has happened since then, and many of the criticisms have been 'fixed' by later Java releases. Java remains a core and important programming language, however, and it has been extended to the mobile arena. Point and laugh at our sad efforts in this area too.
~Z~