% jfig/doc/jvm-compatibility.txt (26.10.2002)


jfig compatibility with different Java virtual machines:


o  In theory, jfig should run on every Java virtual machine
   that implements the Java 1.1 specification or higher.


o  High-quality rendering relies on the Java2D class libraries, 
   and therefore requires Java 2 (JDK 1.2.2) or higher.


o  Without Java2D, rendering quality is lower due to restrictions
   in the Java 1.1 graphics libraries. 

   For example, rotated text and ellipse objects are displayed 
   without rotation and dash-dot lines patterns are shown as 
   simple dashed lines. Still OK for most simple drawings. 

   Note that jfig still manages and stores the full attributes, 
   it just cannot display them.


o  In practice, despite the "write once, run anywhere" slogan, 
   almost all available JVMs have several - and different - bugs.
   See the table at the end of this file for more information.


o  Keyboard problems: Almost all versions of the JDK have severe 
   problems with non-US keyboards (US keyboards seem to work).

   For example, Suns JDK 1.3 for Linux simply ignores key-presses 
   for many important keys, e.g. '?' or '<'. This also affects the
   'create text' command in jfig and may make jfig unusable. 
   As Sun claims that they often cannot reproduce such bugs,
   please don't hesitate to report the bug together with your
   JVM and OS version to www.javasoft.com/cgi-bin/bugreport.cgi

   Some version of JDK 1.3.1 work, others do not. JDK 1.4.x seems
   to be broken, too. 


o  Focus problems:  The new keyboard focus API introduced with
   JDK 1.4 seems to work on Windows, but not as well on Linux.
   Sometimes, the jfig2 editor seems to loose the keyboard focus,
   which means that you cannot enter text or use the keyboard
   shortcuts, after this happened. No known workaround (yet).


o  Font problems: "Write once, run everywhere, look different".

   Unfortunately, the Java environment does not specify the 
   details of font rendering. Not surprisingly, most Java virtual 
   machines use platform-dependent and different fonts for screen 
   rendering.  Please see the FAQ for more information about 
   configuring jfig font rendering.

   Finally , font rendering still has many bugs. For example, the 
   Microsoft VM will not display greek letters and math symbols, 
   although the corresponding glyphs are available on the system.
   As another example, both Sun's and IBM's JDK 1.3 on X11 will 
   render some Type1 or TrueType fonts correctly, but not all.
   Finally, font rendering seems to be highly dependent on text
   rotation.


o  Redraw problems: The redraw algorithm used by jfig uses multiple
   buffers to improve rendering performance. Unfortunately, the
   current algorithm seems to conflict with some optimizations used
   by JDK 1.3+ itself, resulting in missing redraws when opening
   a new file. As the problem only appears on some machines, it is
   hard to debug. If you experience this sort of problems, please
   report your machine configuration (OS, JVM used, processor speed,
   graphics card, etc).

   Overall, jfig should have no more redraw problems than xfig :-)  


o  GUI problems: On some Java virtual machines, the AWT fails to
   support nested dialog windows, with a variety of symptoms.

   This may prevent you from using the "Select value" dialogs
   from the "Edit object" or "Edit global properties" dialogs.
   Report such bugs to www.javasoft.com/cgi-bin/bugreport.cgi

   Also, all versions of JDK 1.2.x tend to deadlock when running
   jfig, due to JDK internal problems. Please upgrate to JDK 1.3.1.


o  See the file "known-bugs.txt" for a list of jfig known bugs.
   Please send a bug report if you encounter additional bugs. 
   Don't hesitate to request fixes, updates, or new functions.


o  Performance problems:  For most drawings, jfig performance 
   should be acceptable on a modern machine (say, a Pentium-II 
   running JDK 1.3 or MS jview). 

   Please note that most current Java virtual machines use the
   JIT (just-in-time) compiler technique, where only those parts 
   of an application are compiled that are actually used.
   This means that some operations may be slow the first few 
   times they are used, but are getting faster afterwards. 
   Unfortunately, JDK 1.4 seems to compile a little bit later
   than JDK 1.3, so you may have to draw quite a few objects
   for fast execution...

   Still, jfig is slower than xfig:

   1. jfig is targeted at small drawings, e.g. presentation slides.
      The algorithms work reasonably well up to a few hundred or 
      thousand objects. They do not work as well for 10.000+ objects.
      This is not a CAD program for architecture or VLSI design.

   2. On Java 1.1, many drawing operations are implemented in non-
      optimized Java code, because no highly-tuned graphics libraries 
      are available to the AWT (abstract window toolkit). 

   3  Spline objects need too much memory. 
      This is most evident on the 'transit.fig' example from xfig 3.2.

   4. most Java virtual machines still run slower than C code.
  

 

o latest platform compatibility info:              (notes)

  Windows 95/98/NT/2000/ME:

  MSIE 5.0       Microsoft                   OK    (1)
  Netscape 4.7   Netscape                    -     (2)
  Netscape 6     Netscape/Mozilla.org        OK

  jview          Microsoft                   OK    (1)
  JDK 1.1.8      Sun                         OK
  JDK 1.1.8      IBM                         OK
  JDK 1.2.2      Sun                         OK
  JDK 1.3.x      Sun                         OK
  JDK 1.4.x      Sun                         OK

  Solaris:

  JDK 1.1.7      Solaris 2.5.1+              OK
  JDK 1.1.8      Solaris 2.5.1+              OK
  JDK 1.2.2      Solaris 2.7+                OK
  JDK 1.3.x      Solaris 2.7+                OK

  Linux (Kernel 2.2.x)

  JDK 1.1.8      Blackdown                   OK   (1)
  JDK 1.1.8      IBM                         OK  
  JDK 1.2.2      Blackdown                   OK 
  JDK 1.3.x      Sun                         OK   (4,5)
  JDK 1.3.x      IBM                         OK    
  JDK 1.4.x      Sun                         bugs (4,6)
  Kaffe 1.0.6    Transvirtual                OK   (3)

  Macintosh

  not tested, but should work


Notes:

0  All platforms, nested dialogs

   Unfortunately, Java still has a lot of client-side problems,
   e.g. the keyboard or nested-dialog window problems explained
   above. 

   Usually, it is recommended to install the latest stable version 
   of the JVM for your platform. Overall, JDK 1.1.8 and JDK 1.3
   have proven the most usable on our Windows and Unix/Linux systems,
   but we also use Microsoft jview on Windows.


1  Microsoft Internet Explorer (jview):

   Running jfig as an application with the Microsoft VM works
   fine for most files. However, there are a few issues:

   The Microsoft VM is a Java 1.1 virtual machine and as such
   has no Java2D support. No rotated text, no fill patters, etc.

   Even the latest versions of the Microsoft VM (33xx, 38xx)
   have problems with font rendering. For example, neither greek
   letters nor math symbols will display correctly (or at all).
   Use JDK 1.3 if you need greek letters and math symbols.

   Also, there seems to be a bug in Microsoft's implementation of
   java.awt.TextArea: if you append() more than a few dozen lines, 
   performance goes down to zero, probably due to excessive internal 
   buffer copying. 


2  Netscape 4.x:

   You should be able to run the jfig "simple applet" with the
   Netscape VM. But running the jfig editor as an applet is not
   recommended, due to massive performance and stability problem
   of the Netscape VM.

   Note that the latest versions of Netscape (4.77) allow to replace
   the Netscape internal Java VM with Suns JDK. After selecting the
   JDK, jfig should run without problems.


3  Kaffe:

   Please use a recent Kaffe snapshot (1.0.6+). On my Linux system
   with Kaffe 1.0.6, the jfig editor starts and basic editing is
   possible. However, the editor icon and button images are not
   rendered correctly and stability could be better.

4  "dialog window bugs"

   Most versions of the JDK on Unix (Solaris, Linux) platforms 
   exhibit a variety of AWT-related user-interface bugs. The most
   annoying are bugs in the handling of dialog windows. For example,
   several combinations of (JDK, X11, WindowManager) are known
   to show dialog windows in the "iconized" state instead of the
   requested size and position.

   Workaroud:  Try another version of the JDK, or another window
   manager. Some recent versions of the JDK seem to be optimized 
   for the KDE desktop and window manager.
 

5  JDK 1.3.1:
 
   On some machines, you may experience redraw problems. The most
   common symptom is a missing redraw after loading a new file.
   Simply press <cntl>-a or select menu->edit->redraw to request
   a full redraw manually. The problem appears to be related to
   performance optimizations in the JDK 1.3.1 drawing routines. 



6  JDK 1.4.x on Linux

   problems with non-US keyboards and character sets. On my Linux
   system, the AWT does not even deliver low-level events for
   certain keystrokes (while JDK 1.3.x and all other application
   work) like German umlauts.

   Also, intermittend and non-reproducible focus manager problems.
   It appears that sometimes the keyboard focus remains on dialog
   windows, even after those dialog windows have been closed.
   No known workaround.


