[jni4net] Mono discussion

146 views
Skip to first unread message

Pavel Šavara

unread,
Apr 17, 2010, 4:49:54 PM4/17/10
to jni...@googlegroups.com
I started with investigations of support for Mono on x86. The key
problem is different calling convention - cdecl. My current
implementation of JniLocalHandle is build on top of assumption that
small structures are put onto stack same way as scalar types. But
that's not valid assumption, it works just for stdcall. cdecl
allocates the structure on heap and passes just pointer to the
structure, no matter how big the structure is. Why I created
JniLocalHandle ? Because I wanted to make strongly typed difference
between JniLocalHandle and JniGlobalHandle. We could drop it and use
IntPtr in order to deal with this problem. It will impact all
generated proxies on C# side.

There is another problem with cdecl, because I need to put
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
on any JNI delegate. Example is JNIEnv.AllocObject. I think I'll need
to duplicate whole JNIEnv class in order to avoid condition for each
call.

Last small problem is with JNI.Dll which has the main
[DllImport("jvm.dll", CallingConvention = CallingConvention.StdCall)]
, it must be duplicated as well, because there is jvm.so on Linux.

Currently I don't hear from people that they need Mono/Linux support
for jni4net. If you think you need it, please tell us the use case.
I'm interested to hear why Mono support is worth of the effort. Till
then I put it on ice.

Pavel

same text is here:
http://zamboch.blogspot.com/2010/04/jni4net-not-yet-on-mono-linux.html

--
You received this message because you are subscribed to jni...@googlegroups.com
http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
http://jni4net.sf.net/

Matt Zinkevicius

unread,
May 14, 2010, 3:36:26 PM5/14/10
to jni4net
My team would be very interested in Mono support with your very cool
framework. We are currently trying to wrap our .NET plug-in libraries,
so that Java plug-ins can be used with our .NET core.

--MZ
> You received this message because you are subscribed to jni4net@googlegroups.comhttp://groups.google.com/group/jni4net?hl=en-GB?hl=en-GBhttp://jni4net.sf.net/

Pavel Šavara

unread,
May 15, 2010, 1:52:38 AM5/15/10
to jni...@googlegroups.com
Glad to hear :-)

what your application does ?
how many users will benefit from the effort ?
are you in position to significantly contribute your time to make it happen ?

Cheers
Pavel

Matt Zinkevicius

unread,
May 20, 2010, 12:30:08 AM5/20/10
to jni4net
It is not a released product yet, so I can't talk about it at this
time :-( It's enterprise business software, so nothing too fun :-)

Our software won't begin to be ported to work with Mono for at least a
year though, so I wouldn't make your work a high priority for just us.
I just wanted to raise my hand to let you know that we will eventually
need this capability.

Number of users will be potentially thousands.

Our team could probably help report issues, but development help is
unlikely.

Keep up the great work!!
Matt
> >> You received this message because you are subscribed to jni4...@googlegroups.comhttp://groups.google.com/group/jni4net?hl=en-GB?hl=en-GBhttp://jni4ne...

Pavel Šavara

unread,
May 20, 2010, 2:07:44 AM5/20/10
to jni...@googlegroups.com
Matt,
thanks a lot :-)

Piotr Hrebieniuk

unread,
Jun 17, 2010, 2:53:41 AM6/17/10
to jni4net
Hi,
My group is very interested in deeper look into your product, if it
would support Linux/Mono runtime enviroment. Are you planning to
develop this functionality ?

Thanks,
Piotrek

Pavel Šavara

unread,
Jun 17, 2010, 4:39:27 PM6/17/10
to jni...@googlegroups.com
Hi Piotrek,

as I said before, I don't plan to spend my time on it till I see good
use for it.

what your application does ?
how many users will benefit from the effort ?
are you in position to significantly contribute your time to make it happen ?

Cheers
Pavel

Pavel Šavara

unread,
Dec 1, 2010, 2:46:11 PM12/1/10
to Gil, jni...@googlegroups.com
Hi Gil,

please join jni4net on google groups and continue discussion there.
It is quite some time in the past since i tried this on mono last
time. So I guess they fixed couple of problems in the meantime.

Do you have time & skills to create prototype ? To solve the cdecl
calling convention problems ? Or you are voicing you are interested to
use it ?

Thanks
Pavel

On Wed, Dec 1, 2010 at 4:47 AM, Gil <vdo...@gmail.com> wrote:
> Hi,
>
> I just found this project through the Mono for Android project and it
> seems this project will be helpful for them(and soon with me as I'm
> going to enter the android development).
>
> It will be useful for our team 'coz we are building several projects
> created using both Java and .NET. We're just using IKVM to consume
> Java libraries and Socket-based messaging. We want this kind of
> project to call native Java libraries on their native runtime instead
> of IKVM.
>
> We have an encryption engine/server created using Java and the client
> that we use is also written in Java.
>
> One more thing, I have an open source project too that will need this
> project later. Please take a look:
> http://sourceforge.net/projects/mefp/
> It is still in alpha stage and maybe I can incorporate Java support on
> its stable release.
>
> Thanks!

Gil

unread,
Dec 1, 2010, 7:23:48 PM12/1/10
to jni4net
Hi,

I think I already joined this group. Sorry, I'm not that familiar with
google group's interface.

Anyway, I want to help but I'm too busy right now with my other
projects. Maybe I can test it by February next year.

I hope the Mono team already fixed it.

Thanks!

On Dec 2, 3:46 am, Pavel Šavara <pavel.sav...@gmail.com> wrote:
> Hi Gil,
>
> please join jni4net on google groups and continue discussion there.
> It is quite some time in the past since i tried this on mono last
> time. So I guess they fixed couple of problems in the meantime.
>
> Do you have time & skills to create prototype ? To solve the cdecl
> calling convention problems ? Or you are voicing you are interested to
> use it ?
>
> Thanks
> Pavel
>
Reply all
Reply to author
Forward
0 new messages