JNIPort

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

JNIPort

cdelaunay
Hello,

If soemone is interested in JNIPort, I just published a small example using it. It is not doing yet what I was expecting :), but it already set up correctly a Pharo 1.1 image to run the example (loading Alien, JNIPort, making a link to the JAVAVM for mac).
In this example I try to generate a mse file with infusion, by directly invoking the main method of Java2Mse (instead of invoking OSProcess to execute the script). All seems to work fine (except that the mse file is not generated, I still have to find why).
To load it, this should work (for a pharo 1.1 image):

       Gofer new
package: 'JNIPortExample';
load.

There is a class comment and an example in the class side ('cyrilleOwnExample').




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort

Tudor Girba
Hi Cyrille,

This sounds great. When you say that all seems to work fine, is there  
anything that you can actually trigger on the Java side? Also, is it  
possible to have callbacks from Java to Smalltalk?

Cheers,
Doru


On 30 Aug 2010, at 17:22, Cyrille Delaunay wrote:

> Hello,
>
> If soemone is interested in JNIPort, I just published a small  
> example using it. It is not doing yet what I was expecting :), but  
> it already set up correctly a Pharo 1.1 image to run the example  
> (loading Alien, JNIPort, making a link to the JAVAVM for mac).
> In this example I try to generate a mse file with infusion, by  
> directly invoking the main method of Java2Mse (instead of invoking  
> OSProcess to execute the script). All seems to work fine (except  
> that the mse file is not generated, I still have to find why).
> To load it, this should work (for a pharo 1.1 image):
>
>        Gofer new
> url: 'www.squeaksource.com/DelaunayTmpStuffs';
> package: 'JNIPortExample';
> load.
>
> There is a class comment and an example in the class side  
> ('cyrilleOwnExample').
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Beauty is where we see it."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort

Stéphane Ducasse
In reply to this post by cdelaunay
cool!

On Aug 30, 2010, at 5:22 PM, Cyrille Delaunay wrote:

> Hello,
>
> If soemone is interested in JNIPort, I just published a small example using it. It is not doing yet what I was expecting :), but it already set up correctly a Pharo 1.1 image to run the example (loading Alien, JNIPort, making a link to the JAVAVM for mac).
> In this example I try to generate a mse file with infusion, by directly invoking the main method of Java2Mse (instead of invoking OSProcess to execute the script). All seems to work fine (except that the mse file is not generated, I still have to find why).
> To load it, this should work (for a pharo 1.1 image):
>
>        Gofer new
> url: 'www.squeaksource.com/DelaunayTmpStuffs';
> package: 'JNIPortExample';
> load.
>
> There is a class comment and an example in the class side ('cyrilleOwnExample').
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort

Tudor Girba
In reply to this post by Tudor Girba
Hi again,

I did not try your code yet, but the MSE is created in the same folder  
where the Java application will appear to be running. Could it be that  
you actually get the file but in another folder than what you expected?

Cheers,
Doru

On 31 Aug 2010, at 00:59, Tudor Girba wrote:

> Hi Cyrille,
>
> This sounds great. When you say that all seems to work fine, is  
> there anything that you can actually trigger on the Java side? Also,  
> is it possible to have callbacks from Java to Smalltalk?
>
> Cheers,
> Doru
>
>
> On 30 Aug 2010, at 17:22, Cyrille Delaunay wrote:
>
>> Hello,
>>
>> If soemone is interested in JNIPort, I just published a small  
>> example using it. It is not doing yet what I was expecting :), but  
>> it already set up correctly a Pharo 1.1 image to run the example  
>> (loading Alien, JNIPort, making a link to the JAVAVM for mac).
>> In this example I try to generate a mse file with infusion, by  
>> directly invoking the main method of Java2Mse (instead of invoking  
>> OSProcess to execute the script). All seems to work fine (except  
>> that the mse file is not generated, I still have to find why).
>> To load it, this should work (for a pharo 1.1 image):
>>
>>       Gofer new
>> url: 'www.squeaksource.com/DelaunayTmpStuffs';
>> package: 'JNIPortExample';
>> load.
>>
>> There is a class comment and an example in the class side  
>> ('cyrilleOwnExample').
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Beauty is where we see it."
>
>
>

--
www.tudorgirba.com

"Yesterday is a fact.
  Tomorrow is a possibility.
  Today is a challenge."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort

cdelaunay
I say that all seems to work fine because when calling the java main method, it does not raise any error , it returns the ghost class 'Java2Mse' (And I guess that it is the normal behavior of a 'main' method). But when I search for the file it should have generated (using the mac finder), I don't get any result.

2010/8/31 Tudor Girba <[hidden email]>
Hi again,

I did not try your code yet, but the MSE is created in the same folder where the Java application will appear to be running. Could it be that you actually get the file but in another folder than what you expected?

Cheers,
Doru


On 31 Aug 2010, at 00:59, Tudor Girba wrote:

Hi Cyrille,

This sounds great. When you say that all seems to work fine, is there anything that you can actually trigger on the Java side? Also, is it possible to have callbacks from Java to Smalltalk?

Cheers,
Doru


On 30 Aug 2010, at 17:22, Cyrille Delaunay wrote:

Hello,

If soemone is interested in JNIPort, I just published a small example using it. It is not doing yet what I was expecting :), but it already set up correctly a Pharo 1.1 image to run the example (loading Alien, JNIPort, making a link to the JAVAVM for mac).
In this example I try to generate a mse file with infusion, by directly invoking the main method of Java2Mse (instead of invoking OSProcess to execute the script). All seems to work fine (except that the mse file is not generated, I still have to find why).
To load it, this should work (for a pharo 1.1 image):

     Gofer new
       url: 'www.squeaksource.com/DelaunayTmpStuffs';
       package: 'JNIPortExample';
       load.

There is a class comment and an example in the class side ('cyrilleOwnExample').



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Beauty is where we see it."




--
www.tudorgirba.com

"Yesterday is a fact.
 Tomorrow is a possibility.
 Today is a challenge."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev