Hello world,
The latest update of JNIPort for VisualWorks in the Cincom Public Repository is stable enough that I have set its blessing level to "Development" instead of "Work in Progress". In the weeks to come, I won't have as much time for working on JNIPort as I had during the last few months. If you are going to use JNIPort, please consider contributing to it by addressing one of the open issues: - Testing on platforms other than Windows. - Making callbacks from Java to Smalltalk work (see below). - Adding development tools (see below). Please let me know what you do, such that we can avoid redundant or conflicting work. New features: ------------- JNIPort for VisualWorks now includes support for the JNI version 1.6 which is part of Java 6, and the external interfaces should find the respective shared libraries on Unix/Linux and MacOS-X (although I have not tested it as I only have a Windows XP machine). JNIPort now distinguishes between JNI versions and does not attempt to execute functions which are not present in the Java VM which has been attached to VisualWorks. Instead, it raises a KeyNotFoundError - which is much easier to handle than an access violation at the Java VM level. ;-) Apart from the JNIPort Settings Tool which can be opened from the VisualLauncher's Tools menu, there is now also a (very simple) help window with instructions for a quick start and an example for using the java.util.logging package. Bug fixes: ---------- - To work around a problem with loading subclasses of ExternalInterface, their methods are now recompiled after loading such that an inconsistent load order does not lead to wrong type definitions. - A missing conversion from C strings to Smalltalk Strings in the callback which catches the Java VM's log messages (the vfprintf hook) has been added. And tested - I have seen the Java VM's messages in my Transcript. :-) - JNIPort can now be unloaded without errors when no JVMSettings and no JVM have been created. JNIPort has been tested with VisualWorks 7.4.1 and the latest development build of 7.5, with Java 5 and Java 6, and so far only on Windows XP SP2. Known bugs: ----------- - Callbacks from Java to Smalltalk do not work yet (but the JVM hooks for vfprintf, abort and exit do). - When starting a JVMWithCallbacks which generates the method dictionaries of ghost classes lazily, there is a NonBooleanReceiver exception during JVM startup which I have not yet been able to debug. (The location where it happens is protected by a RecursionLock, and it's in the context of a proxy which tends to resolve itself as soon as you look at it...) - I have not yet been able to produce loadable parcels from JNIPort packages / bundles which contain the subclasses of ExternalInterface due to problems with parcel loading and ExternalInterfaces. This means that for the time being, you will not be able to deploy JNIPort as parcels, but must load it into the image before creating a runtime image. Missing features: ----------------- - If you want to use the DolphinJNIHelper on platforms other than Windows, you have to compile it yourself. There are no makefiles or instructions for doing this. - The tools which Chris Uppal has written for the Dolphin Smalltalk version of JNIPort, from which JNIPort for VisualWorks is derived, are not available in VisualWorks. To get an impression, have a look at the documentation at http://www.metagnostic.org/DolphinSmalltalk/JNIPort.html. In particular, tools for browsing the wrapper classes which are generated, and for creating "real" wrapper classes from dynamically generated ghost classes should be added. Monitoring tools would be useful, too. - Documentation for using the JVM hooks and handling events triggered by different components of JNIPort. - It might be a good idea to add the non-Smalltalk files (jar files and their source code, documentation, DolphinJNIHelper) to the JNIPort bundle such that they are versioned in synch with the Smalltalk code. Enjoy! Joachim Geidel |
Free forum by Nabble | Edit this page |