Hi,
A new version of JavaConnect (2.0 beta) is available for download and use. All information on how to obtain and use JavaConnect is available on http://www.info.ucl.ac.be/~jbrichau/javaconnect.html (it is version 1.114 in the store, or any later version marked 'development'). JavaConnect is a Smalltalk library that allows to seamlessly interact with Java objects from Smalltalk. The current implementation is available for Visualworks and a version for Squeak/Pharo is being prepared. Using JavaConnect, a Smalltalk application can access any Java object and send messages to it, just as if it were a Smalltalk object. Similarly, any Smalltalk object can be passed as an argument to a Java method. The first version of JavaConnect was developed end of 2006, early 2007, using the same basic mechanisms of the Visual Smalltalk JavaInSt and Dolphin JNIPort works. JavaConnect can be used to work with any Java library and it has been specifically used to lay a connection between Smalltalk-based code reasoning tools and a running Eclipse Java environment (http://www.info.ucl.ac.be/~jbrichau/penumbra.html ). Following a couple of years of slow incremental improvements, we have recently improved JavaConnect to version 2.0, featuring various novelties and upgrades. Here are the highlights: - JavaConnect 2 supports running the JVM in a separate OS thread, especially allowing Mac OS X users to use the Java AWT/Swing from JavaConnect. This particularity of Java for Mac OS X platforms requires specific treatment of the Java<->Smalltalk connection for each Smalltalk process through the Visualworks DLLCC threaded communication. JavaConnect transparantly manages this interaction. Unfortunately, such threaded communication is very slow, so you might want to use non-threaded communication if you do not need the Java GUI. - We packaged a Java decompiler in JavaConnect which is used to decompile Java source code and show it when browsing the loaded Java classes from the refactoring browser. - A more experimental feature allows to translate Java methods to equivalent Smalltalk methods, whenever possible. When Java methods merely invoke methods on the incoming arguments and when you pass Smalltalk objects to these methods, you can overcome a lot of the communication overhead by translating the Java method to a Smalltalk method, hence keeping the entire execution in Smalltalk. This feature already works for many methods but will gradually become more complete as we go on. Our goal here is to be able to 'shift' an entire object tree (such as a Java parsetree) to Smalltalk and disconnect from the JVM for subsequent reasoning over the parsetree. This is of course inspired by our principal use of JavaConnect (i.e. connecting to the Eclipse environment). - Any Smalltalk object can be passed as an argument to a Java method. This means callbacks from Java into Smalltalk do not require any specific provisions from the Java side (except one limitation in the current version -- see later). Following the Smalltalk spirit, all will go well as long as the Smalltalk object understands the messages that Java sends to it. At this time, the limitation is that the argument type of the method (to which the Smalltalk object is passed) must be of an interface type since the mechanism relies on dynamic Java proxy generation. This limitation will soon be removed though as we work around this limitation of dynamic Java proxies. Furthermore: - Java packages are entirely mapped onto the Smalltalk namespaces, allowing to reference Java classes just like you reference Smalltalk classes. - Java namespaces, classes and code can be browsed from within the refactoring browser. - Smalltalk methods and variables can be added to the Java classes such that those methods and variables are visible and useable by the Smalltalk code. Using the integration in the refactoring browser, you can also publish these to a store (without the Java methods, obviously). - A framework for selecting specific classloaders for specific classes can be used. This is, for example, necessary to be able to run Eclipse in JavaConnect and use its loaded classes in the Smalltalk environment. - JavaConnect was implemented as a specialization of the Smalltalk MOP. This was an exercise to see how easy it would be to make Java classes appear like Smalltalk classes through subclassing the Class and MetaClass hierarchy. This has been useful for demonstrating the dynamic and reflective possibilities of a language like Smalltalk in the context of a course on reflection. JavaConnect runs on Mac OS X, Linux and Windows. Have fun using it and do not hesitate to contact me for any bugs or problems. This is a beta version, so there must be some ;-) ---------------------------- Johan Brichau [hidden email] _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Johan Brichau schrieb:
> JavaConnect runs on Mac OS X, Linux and Windows. > > Have fun using it and do not hesitate to contact me for any bugs or > problems. This is a beta version, so there must be some ;-) Hello, where do JavaConnect and JNIPort differ? As far as I can tell, both are using the javavm as dll hence JNI. Cheers, Claus _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On 25 Aug 2009, at 21:26, Claus Kick wrote:
> Johan Brichau schrieb: > >> JavaConnect runs on Mac OS X, Linux and Windows. >> >> Have fun using it and do not hesitate to contact me for any bugs or >> problems. This is a beta version, so there must be some ;-) > > Hello, > > where do JavaConnect and JNIPort differ? > > As far as I can tell, both are using the javavm as dll hence JNI. Sure, the underlying technique is the same but there are still many differences. I tried to summarize the important differences on the JavaConnect website: http://www.info.ucl.ac.be/~jbrichau/javaconnect.html best regards, ---------------------------- Johan Brichau [hidden email] _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |