Re: How to use Amaya in Java?

>   I see in the last release that you have implemented a java interface to 
>   access to Thot API.

  Right, note however that most of the Java API hasn't been tested yet.

A pre-draft version of a white paper on the subject is available at:

All the C sources are in the Thot/javalib directory. Most of them are
stubs automatically generated from the Thot/thotlib/include headers.

All the precompiled classes are in Thot/classes : : Java JDK 1.0.2 for Kaffe : Biss AWT reimplementation for Kaffe : Jigsaw classes needed for network accesses : Java part of the stubs : Specific classes for Amaya dealing with network I/O contains all the sources for jigsaw, thotlib and amaya
packages. Extract it if you really want to play with Java.

There is a new set of make rules related to Java available from
Thot/$MACHINE/Makefile :

   make kaffe : rebuild the kaffe libraries and binaries from sources
   make stubs : rebuild the C/Java stubs
                (need to call "make amaya" to recompile them)
   make classes : recompile the Java classes found under Thot/classes
   make zips : rebuild the zips

>   Say i want to developped some java class to be integrated in amaya. Could
>   you give me more explanation on:
>	- how to install & call my java.class from C source of Amaya ?

From the user interface, there is an additional Java button at the right.
Clicking on it lauch a filesystem browser looking for .class files. Supposing
that you have extracted and called "make classes" some
demos should show up from Thot/classes/amaya/applets .

One can start any applet (with arguments) given that the class contains
a static method called "main" :
       with one of the following signatures :
           static int main(int document)
           static void main(int document)
           static void main(String[] args)
           static int main(String[] args)
           static void main()
A new thread is lauched to run the given method.

have a look a Thot/classes/thotlib/ and

for more extensive documentation :-) especially how to call Java classes
from C calls.

>	- how to call Thot API from my java.class through your java-thot api ?

Look at the example from 


and the thotlib Java interface from


Some basic classes (generated stubs) offers a list of native methods
with the same names and arguments as the C Thot API. Some wrapper classes,
more Java oriented are under construction e.g.,,
etc ...

  Of course all this is still a work in progress :-)



Daniel      | W3C / INRIA Rhone-Alpes | Today's Bookmarks :| 655 av de l'Europe      | Linux, WWW, Java,
Tel : +33 04 76 61 53 85    | 38330 Montbonnot        | badminton, Kaffe,
Fax : +33 04 76 54 76 15    | France                  | Amaya and CSS.
Home: +33 04 76 63 05 86    |

Received on Thursday, 15 May 1997 11:40:24 UTC