[ANN] JNIPort 2.0 for VisualWorks, Pharo and Squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] JNIPort 2.0 for VisualWorks, Pharo and Squeak

Joachim Geidel
JNIPort 2.0 for VisualWorks, Pharo and Squeak is now available!

JNIPort is a Smalltalk library which allows Java code to be invoked from
Smalltalk. It acts as a bridge between the world of Smalltalk objects and a
Java Virtual Machine (JVM) where Java code is executing. For more
information see

    http://jniport.wikispaces.com

JNIPort 2.0 for VisualWorks can be loaded from the Cincom Public Store
Repository and from the JNIPort wiki at

    http://jniport.wikispaces.com/Downloads

JNIPort 2.0 for Pharo and Squeak is available from SqueakSource at

    http://www.squeaksource.com/JNIPort.html

and from the JNIPort wiki.

The changes from JNIPort 1.9 are:

- JNIPort can now be used in Pharo and Squeak.

- Packages have been renamed such that the can be shared between Store
  and Monticello.

- Platform specific code has been moved to separate packages to make the
  core packages portable between VisualWorks, Pharo, and Squeak.

- The much-critized _null postfix used for selectors of wrapper methods
  which don't have arguments is gone.

- A few bugs have been fixed.

Installation instructions for VisualWorks are on the JNIPort wiki,
instructions for Pharo and Squeak are on the wiki of the JNIPort project
page of SqueakSource. I strongly encourage you to read the instructions
before installing and using JNIPort.

JNIPort 2.0 has been tested with:

- VisualWorks from 7.5 to 7.8 (trent dec10.3) on Mac OS X 10.6.6 and
  Windows XP SP 3

- VisualWorks from 7.7 to 7.8 (trent dec10.3) on Ubuntu 10.04 (64bit)
  with both the 32-bit and the 64-bit VisualWorks VMs

- Squeak 4.2 on Mac OS X 10.6.6 and Windows XP SP 3

- Pharo 1.1.1 and 1.2 on Mac OS X 10.6.6 and Windows XP SP 3

Known issues:

- In Pharo 1.1.1, you may encounter an error when JNIPort tries to register
  a new Java object in an internal weak dictionary. This is a bug in Pharo's
  implementation of this collection class. I can't do anything about it. If
  you can't live with it, please upgrade to Pharo 1.2.

- JNIPort for Pharo and Squeak currently cannot be used with the Cog VM.

- Callbacks from foreign operating system threads cannot be used in Pharo
  and Squeak. The Alien foreign function interface does not yet support
  this feature. When you run the unit tests, three tests will fail because
  of this restriction. These failures are expected and do not indicate bugs.

Best regards,
Joachim Geidel



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] JNIPort 2.0 for VisualWorks, Pharo and Squeak

Tudor Girba
Sounds great!

What are the impediments of getting it to work with Cog on Pharo?

Cheers,
Doru


On 5 Feb 2011, at 16:14, Joachim Geidel wrote:

> JNIPort 2.0 for VisualWorks, Pharo and Squeak is now available!
>
> JNIPort is a Smalltalk library which allows Java code to be invoked from
> Smalltalk. It acts as a bridge between the world of Smalltalk objects and a
> Java Virtual Machine (JVM) where Java code is executing. For more
> information see
>
>    http://jniport.wikispaces.com
>
> JNIPort 2.0 for VisualWorks can be loaded from the Cincom Public Store
> Repository and from the JNIPort wiki at
>
>    http://jniport.wikispaces.com/Downloads
>
> JNIPort 2.0 for Pharo and Squeak is available from SqueakSource at
>
>    http://www.squeaksource.com/JNIPort.html
>
> and from the JNIPort wiki.
>
> The changes from JNIPort 1.9 are:
>
> - JNIPort can now be used in Pharo and Squeak.
>
> - Packages have been renamed such that the can be shared between Store
>  and Monticello.
>
> - Platform specific code has been moved to separate packages to make the
>  core packages portable between VisualWorks, Pharo, and Squeak.
>
> - The much-critized _null postfix used for selectors of wrapper methods
>  which don't have arguments is gone.
>
> - A few bugs have been fixed.
>
> Installation instructions for VisualWorks are on the JNIPort wiki,
> instructions for Pharo and Squeak are on the wiki of the JNIPort project
> page of SqueakSource. I strongly encourage you to read the instructions
> before installing and using JNIPort.
>
> JNIPort 2.0 has been tested with:
>
> - VisualWorks from 7.5 to 7.8 (trent dec10.3) on Mac OS X 10.6.6 and
>  Windows XP SP 3
>
> - VisualWorks from 7.7 to 7.8 (trent dec10.3) on Ubuntu 10.04 (64bit)
>  with both the 32-bit and the 64-bit VisualWorks VMs
>
> - Squeak 4.2 on Mac OS X 10.6.6 and Windows XP SP 3
>
> - Pharo 1.1.1 and 1.2 on Mac OS X 10.6.6 and Windows XP SP 3
>
> Known issues:
>
> - In Pharo 1.1.1, you may encounter an error when JNIPort tries to register
>  a new Java object in an internal weak dictionary. This is a bug in Pharo's
>  implementation of this collection class. I can't do anything about it. If
>  you can't live with it, please upgrade to Pharo 1.2.
>
> - JNIPort for Pharo and Squeak currently cannot be used with the Cog VM.
>
> - Callbacks from foreign operating system threads cannot be used in Pharo
>  and Squeak. The Alien foreign function interface does not yet support
>  this feature. When you run the unit tests, three tests will fail because
>  of this restriction. These failures are expected and do not indicate bugs.
>
> Best regards,
> Joachim Geidel



--
www.tudorgirba.com

"Don't give to get. Just give."






Reply | Threaded
Open this post in threaded view
|

Re: [ANN] JNIPort 2.0 for VisualWorks, Pharo and Squeak

Joachim Geidel
Am 05.02.11 18:11 schrieb Tudor Girba:
> What are the impediments of getting it to work with Cog on Pharo?

JNIPort relies on Alien, and I have not yet found a Cog VM working with
Alien and JNIPort.

I tried Squeak 5.8b12 for Mac OS X which identifies itself as Cog, but it
crashes when you just evaluate "LibCLibrary uniqueInstance". Apparently this
VM version doesn't work with Alien.

Eliot's latest Cog build for Mac OS X at
http://www.mirandabanda.org/files/Cog/VM/VM.r2349/ is able to load libc.
When I try to use JNIPort, it can't find the library libjvm.dylib when I
create a symbolic link to it in the working directory. When I create a
symbolic link in the subdirectory Cog.app/Contents/Resources, it is able to
load the library, but the VM crashes with a bus error when I try to call the
first function of the library. I currently have no idea what causes the
error. As the same code runs without problems on a Squeak VM, I don't think
that the problem is in the JNIPort code, but I may be wrong.

So, no JNIPort on Cog for now. This may change soon, of course.

Regards,
Joachim Geidel



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] [ANN] JNIPort 2.0 for VisualWorks, Pharo and Squeak

Luc Fabresse
Hi Joachim,
 
 JNIPort sounds really great and I will test it. 
 It is really great to have these kind of bindings.
 
 For your Alien problem on Cog, I also experienced some troubles with the library path. So I am pretty sure that the problem is on the Cog side. 
Perhaps the Alien plugin compiled in Cog. I would like to do more investigations on that.
 
#Luc


2011/2/5 Joachim Geidel <[hidden email]>
Am 05.02.11 18:11 schrieb Tudor Girba:
> What are the impediments of getting it to work with Cog on Pharo?

JNIPort relies on Alien, and I have not yet found a Cog VM working with
Alien and JNIPort.

I tried Squeak 5.8b12 for Mac OS X which identifies itself as Cog, but it
crashes when you just evaluate "LibCLibrary uniqueInstance". Apparently this
VM version doesn't work with Alien.

Eliot's latest Cog build for Mac OS X at
http://www.mirandabanda.org/files/Cog/VM/VM.r2349/ is able to load libc.
When I try to use JNIPort, it can't find the library libjvm.dylib when I
create a symbolic link to it in the working directory. When I create a
symbolic link in the subdirectory Cog.app/Contents/Resources, it is able to
load the library, but the VM crashes with a bus error when I try to call the
first function of the library. I currently have no idea what causes the
error. As the same code runs without problems on a Squeak VM, I don't think
that the problem is in the JNIPort code, but I may be wrong.

So, no JNIPort on Cog for now. This may change soon, of course.

Regards,
Joachim Geidel