Unmanaged code interface : Java JNI vs .NET interoperability

S

Sai Kit Tong

Hi,

I am developing a new application running on Windows platform that needs to
interface with existing legacy code - written in basic C / C++. I am trying
to evaluate Java vs C# implementations. Originally, I have the impression
that C# should be a clear winner.

I started with Java and using the guideline from the book "Java Native
Interface". Though complex, the book provide details of the practical
implementation and potential pitfalls for poor implementation. Particularly,
it provides a clear picture on life cycle managment, garbage collection,
exception handling (responsibility) and retaining of object oriented
implementation (one-to-one mapping). However, when I switched my focus on
C#, I had difficult in finding good literature and examples for handling
those issues. I checked Chapter 1 of "COM and .NET Interoperability" and
Chapter 15/16 of "Essential Guide to Managed Extensions for C++". Hence,
that makes me lean on the Java implementation that the C# implementation -
based on the fact that I know what I will get in details. Did I miss any
information critical? Could anyone point me to better article in this
particular aspect?

Thanks in advance.
 
J

Jeffrey Tan[MSFT]

Hi Sai,

There is a good book give you a deeply insight into the .net framework:
<Applied .net framework programming> by Jeffrey Richter
It talks much about GC, Exception and so on.

Also, you can have a clear look at .net GC in these 2 articles:
http://msdn.microsoft.com/msdnmag/issues/1100/gci/
http://msdn.microsoft.com/msdnmag/issues/1200/GCI2/

Hope this helps.
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Sai Kit Tong" <[email protected]>
| Subject: Unmanaged code interface : Java JNI vs .NET interoperability
| Date: Fri, 12 Sep 2003 14:38:42 -0500
| Lines: 24
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 130.99.229.109
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:184501
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I am developing a new application running on Windows platform that needs
to
| interface with existing legacy code - written in basic C / C++. I am
trying
| to evaluate Java vs C# implementations. Originally, I have the impression
| that C# should be a clear winner.
|
| I started with Java and using the guideline from the book "Java Native
| Interface". Though complex, the book provide details of the practical
| implementation and potential pitfalls for poor implementation.
Particularly,
| it provides a clear picture on life cycle managment, garbage collection,
| exception handling (responsibility) and retaining of object oriented
| implementation (one-to-one mapping). However, when I switched my focus on
| C#, I had difficult in finding good literature and examples for handling
| those issues. I checked Chapter 1 of "COM and .NET Interoperability" and
| Chapter 15/16 of "Essential Guide to Managed Extensions for C++". Hence,
| that makes me lean on the Java implementation that the C# implementation -
| based on the fact that I know what I will get in details. Did I miss any
| information critical? Could anyone point me to better article in this
| particular aspect?
|
| Thanks in advance.
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top