> When would anyone ever not have Swing?

These days everyone should have Swing ... and you should feel free to use
it to build fancier GUI controls within the Jmol Applet.

Here is the long answer ...

Back when I started working on Jmol there was still an installed base of
users who were running Internet Explorer with the MSFT JVM ... Microsoft
Java Virtual Machine. MSFT had had dropped support for Java, but there
were still a lot of machines running IE 3 / IE 4 with the embedded MSFT
JVM. I decided to support the MSFT JVM in order to minimize browser/JVM
incompatibility and smooth the transition from the Chime plug-in.

The MSFT JVM did not have much in the way of class libraries, so I was
stuck with their Java 1.1 implementation. For graphics I had to write to
the AWT (A Windowing Tookit) API.

It was always my intention to force everyone to upgrade to the Sun JVM. I
was going to detect what JVM they were running and put up a message
telling them to go to java.com and get the supported/current Java from Sun
at java.com.

My dim recollection is as follows ... I threatened/planned to start
enforcing the Sun JVM on 1 Jan 2004. However, someone suggested/asked that
I wait, so I agreed to postpone the day of reckoning for another year ...
to Jan 2005. I don't remember if I ever took any specific steps to
actually enforce this.

At this point I think you can safely assume that everyone has Swing + the
Java2D graphics class libraries. This frees you up to build more
interesting GUI interfaces within the JmolApplet.

Be advised that there are other (splinter) groups working on Java
implementations. For example, there is a GNU compiler for Java and there
was (is?) a GNU effort to reimplement all of the Java class libraries. But
I do not think that this should be a consideration for Jmol and I
recommend that you feel feel free to do development against the Java Swing
class libraries.

Some final thoughts regarding JVM version checking ...

 * There should be specific JVM version checking someplace in the Jmol code

 * A minimum JVM should be *enforced* ... Jmol should refuse to run if
someone doesn't have the required version

 * There are/were a couple of places in the code where I jumped through
hoops in order to distinguish between JVM versions. There are a few places
where classes are dynamically loaded depending upon the JVM. For example,
mouse wheel support was introduced with Java 1.4, so there are/were a
couple of different implementations of low-level Jmol mouse support. Some
of this kind of cruft could/should be cleaned up over time as you drop
support for legacy JVMs.

 * As of this date (Aug 2008) you should be enforcing Java 1.4 (released
2002?)

 * In 2004 Sun release J2SE 5.0, with new language features that required
extensions to the Java Virtual Machine. A few years from now we will want
to enforce that JVM as a minimum requirement for Jmol.

 * The AppletLoader can/should do the checking. It can continue to be
compiled so that it will run on all JVMs, including the MSFT 1.1 JVM. When
it encounters a non-compliant JVM it can put up a message telling the user
to go to java.com


Miguel







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to