473,503 Members | 9,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unmanaged code interface : Java JNI vs .NET interoperability

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.
Nov 15 '05 #1
1 2496

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" <sk****@mmm.com>
| 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: <ua**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 130.99.229.109
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.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.
|
|
|

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
372
by: New World Order Pigs | last post by:
Sorry if this is the wrong group, but it seems like a good place to start. I have a control, creating a dll written in c#/.net and some unmanaged code in c++ using embedded c++ V3. Yes, it is for...
4
6811
by: geilen | last post by:
I'm trying to use a dataset returned from a web service in an unmanaged C++ (MFC) client. The dataset is returned as a BSTR, and I'm having trouble reading the BSTR into an XML document for...
3
3995
by: Sai Kit Tong | last post by:
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#...
10
19105
by: Mark Jerde | last post by:
I'm trying to learn the very basics of using an unmanaged C++ DLL from C#. This morning I thought I was getting somewhere, successfully getting back the correct answers to a C++ " int SumArray(int...
4
39934
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
4
1150
by: Fredrik Wahlgren | last post by:
hi I have apet aproject that i created a long time ago and I now want to make part of it managed. This is a dtabase application s I want to create a class in which I wrap ADO.NET. The design is...
5
2776
by: CharlesHenri | last post by:
Hello, i plan to use a managed dll containing WinForm classes in an unmanaged win32 exe. Starting from NOTHING, how do i have to proceed ? I have found the following tutorial on...
2
2237
by: shyam | last post by:
I have a C++ COM based windows service which have more than 30k lines of code and which is stablized over years. We need to take the advantage of the ..NET framework for this project, especially...
2
12343
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.