PC Review


Reply
Thread Tools Rate Thread

C#/J# Integration

 
 
=?Utf-8?B?U3RldmUgQ29ybmV0dA==?=
Guest
Posts: n/a
 
      19th Mar 2005
I'm trying to integrate two pieces of code, one written in J# and the other
in C#. Although there is a single entry point for the program (in the J#
code), objects in each need to be able to instantiate and call methods on
objects in the other. I'm having trouble finding a way to compile this code.

The only good cross-language sample I've seen is the CrossLanguageDev that
comes with VS, but the files in that sample can be compiled in a certain
order to avoid generating ambiguities. I can't do that with my code
(certianly not easily, and possibly not at all).

1. Are there any other good cross-language examples available (especially
examples that use J# as one of the languages)? Does anyone have a
step-by-step tutorial on setting this up?

2. Is it possible to compile all of the code (both J# and C#) in one batch?
If not, is there any way I can compile the J# without errors because the C#
is missing, and vice-versa?

3. As a specific case, how can I compile a C# class and then instantiate it
in J#?


Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3RldmUgQ29ybmV0dA==?=
Guest
Posts: n/a
 
      19th Mar 2005

If it helps any, my current attempt to write a build.bat file (along the
lines of the VS example) is:

@ REM Set command switch for building debug or retail (default is to build
debug)
@ REM Type "build.bat -r" to build for retail
@ SET DEBUGSAMPLE=/debug+
@ IF "%1"=="-r" SET DEBUGSAMPLE=/debug-
@ IF "%1"=="-R" SET DEBUGSAMPLE=/debug-
@ SET DEBUGSAMPLEVC=/Zi
@ IF "%1"=="-r" SET DEBUGSAMPLEVC=
@ IF "%1"=="-R" SET DEBUGSAMPLEVC=

csc %DEBUGSAMPLE% /t:module /out:kelthasInterface.il *.cs
ilasm /DLL /out=kelthasInterface.netmodule kelthasInterface.il
vjc %DEBUGSAMPLE% /addModule:kelthasInterface.netmodule /recurse:*.java


Both ilasm and vjc report errors and fail.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RTM SP1 integration fridau Windows Vista General Discussion 6 5th Feb 2008 04:22 PM
IE Integration jeremy.haynie@gmail.com Microsoft Excel Programming 0 24th Apr 2007 07:15 PM
VC and WAB integration. AA Microsoft VC .NET 0 21st Jan 2004 12:35 PM
VSS integration with VS.NET news.microsoft.com Microsoft Dot NET 17 18th Nov 2003 07:59 PM
VS.NET integration with VSS mcs2@andrew.cmu.edu Microsoft Dot NET 1 5th Nov 2003 09:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:40 AM.