XJS Extension for WeirdX
  What about giving X client programs access to the JavaScript(tm) engine if they are executing in a Java(tm) applet in your Navigator or MSIE ???

Netscape invented the LiveConnect API for that purpose. By adding the XJS extension to WeirdX specialized X clients can evaluate JavaScript expressions or call JavaScript functions, eg to open another browser window or to popup a browser alert box.

How to set it up  
  1. Get version 1.0.15 or higher of WeirdX from here.
  2. Add the XJS extension to the applet parameters, eg

    <PARAM NAME="weirdx.extension" VALUE="DummySHAPE,XJS">

  3. Give the applet the right to execute JavaScript code by adding MAYSCRIPT="true" to the applet/embed/object tags, eg

    <APPLET ... MAYSCRIPT="true"> ... </APPLET>

  4. Get the sources for the X extension and sample clients, compile it and try out the jeval sample program, eg

    you@yourbox $ jeval 'window.open("http://java.sun.com", "sun")'

Notes: So far, I tested it on Windows with Navigator 4.7 and MSIE 5.0 and the X extension and clients on Linux 2.2.x (GLIBC). Unfortunately, the JDK 1.2 plugin executed in MSIE 5.0 does not support the LiveConnect.


Download   WeirdX XJS extension module (Java source, about 4 kByte). Since version 1.0.15 this is included in WeirdX.

Patch for the WeirdX.java module (version 1.0.8) (about 1 kByte). Since version 1.0.15 this is included in WeirdX.

Source code of X extension library and sample clients as gzipped tar (about 7 kByte). An ELF object file XJS.o is contained in this archive. X clients on Intel IA32 UN*X platforms (Linux 2.[02].x, FreeBSD 3.3, SCO UnixWare) can be linked against this object. On other platforms the X extension must be recompiled.

Licensing   GPL for the WeirdX parts, X Consortium license for the extension library and client parts.


Last update 2000-09-18