473,471 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Calling Java Code

Jim
Can you call exisiting Java classes from C#?
Nov 15 '05 #1
6 12679
Nop, only if this classes were developed under the .NET Platform using J#.
There are several options to achive interoperability between J2EE and .NET
Applications, this depends in the scenario. (Servlets, EJB, JSP, JPO, etc)

There is an incoming book in the Patterns and Practices series:

http://www.microsoft.com/resources/practices/coming.asp

And there is always the option to migrate the code:

http://msdn.microsoft.com/library/en...ngjavaapps.asp

--
Alberto Borbolla
Microsoft MVP
WebLog:
http://www.coatl.com
"Jim" <Ja*************@infousa.com> wrote in message
news:0a****************************@phx.gbl...
Can you call exisiting Java classes from C#?

Nov 15 '05 #2
Jim wrote:
Can you call exisiting Java classes from C#?


Is it written in MSs Java (I think it is J#)? If so then you might be
able to (I have never done it that).

You can execute it as a program if nothing else.

I don't know what you mean by call a java class, that is somewhat vague.

Nov 15 '05 #3
If it was written in MS Java, it was probably written with Visual J++ rather
than Visual J#. So, you would need to take your source code and recompile it
with Visual J#. This will give you .NET assemblies that you will be able to
reference from your C# project, like any .NET assembly.

Visual J# offers very good source code compatibility with Visual J++, so
this should be rather seamless. Story would be a bit different if your Java
source was based on SUN's latest JDK.

Bruno

"James Black" <jb****@ieee.org> a écrit dans le message de
news:eG**************@TK2MSFTNGP10.phx.gbl...
Jim wrote:
Can you call exisiting Java classes from C#?
Is it written in MSs Java (I think it is J#)? If so then you might be
able to (I have never done it that).

You can execute it as a program if nothing else.

I don't know what you mean by call a java class, that is somewhat

vague.

Nov 15 '05 #4
bvh
depending on the format of what you're trying to do, you can
use XMLRPC to do it.

Here is an xmlrpc class for C#. I haven't used it so I can't say
whether or not its any good.

http://www.planet-source-code.com/vb...=971&lngWId=10

Of course this is appropriate if you are working on a web based
project, or at very least a client server project and the
procedure call doesn't involve something fancy like renering
a SWING interface, but rather is a simple object oriented method
call. For example if you have business rules in a Java object
and no time or inclination to rework them into C#.

Of course, SOAP is another option along the same lines, but
IMHO XMLRPC is less work than SOAP because the guts of the
request are typically handled for you.
On Wed, 03 Dec 2003 12:46:07 -0800, Jim wrote:
Can you call exisiting Java classes from C#?


Nov 15 '05 #5
C# code compiles for and targets the .NET Framework CLR, Java code
targets JVM. Both are virtual machines that sit on top of the native
OS, they both follow very different binary standards for interfaces.
In order to have true interop between the two you'd need a virtual
machine that can marshall calls between the two platforms at a binary
level. I don't know of any software that does this, but there probably
is something on the market.

The other option (and the one that's already been recommendend) is the
more common approach, which is to use Web Services on the Java end and
the .NET side to marhsall the calls. This was (at least in part) the
whole point of web services and XML itself- to allow disjoined systems
the ability to communicate with one another.


"Jim" <Ja*************@infousa.com> wrote in message news:<0a****************************@phx.gbl>...
Can you call exisiting Java classes from C#?

Nov 15 '05 #6
Jim --

You can call Java classes from C# through our Java/.NET interoperability
tool, JNBridgePro. See www.jnbridge.com for more information, or contact me
for details.

JNBridgePro is one of the solutions featured in the Patterns and Practices
book mentioned below.

Regards,
Wayne
____________________________________

Wayne Citrin
JNBridge, LLC
citrin@NoSpam_jnbridge.com (remove anti-spam text in e-mail before replying)
www.jnbridge.com
Spanning the Worlds of Java and .NET
____________________________________

"Coatl" <Xc****@mvps.org> wrote in message
news:OK**************@TK2MSFTNGP09.phx.gbl...
Nop, only if this classes were developed under the .NET Platform using J#.
There are several options to achive interoperability between J2EE and .NET
Applications, this depends in the scenario. (Servlets, EJB, JSP, JPO, etc)

There is an incoming book in the Patterns and Practices series:

http://www.microsoft.com/resources/practices/coming.asp
Alberto Borbolla
Microsoft MVP

"Jim" <Ja*************@infousa.com> wrote in message
news:0a****************************@phx.gbl...
Can you call exisiting Java classes from C#?


Nov 15 '05 #7

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

Similar topics

9
by: F. GEIGER | last post by:
I've dev'ed a Python prototype of an app, that besides the internals making it up has a gui. While test-driven dev'ing the app's internals in Python is fun as usual, dev'ing the GUI is not so...
2
by: Radha News | last post by:
Hi, I am looking for reference books/tools/code samples for calling java objects/methods from COM/C++ classes. I am reasonably familiar with JNI. If you have used JNI, please let me know of...
3
by: Rajesh | last post by:
Hi, I am using iplanet webserver 4.1. I want to call a java class from ssjs file. But I am not getting the result. I have created a java class file and put it in the folder...
7
by: Klaus Friese | last post by:
Hi, i'm currently working on a plugin for Adobe InDesign and i have some problems with that. I'm not really a c++ guru, maybe somebody here has an idea how to solve this. The plugin is...
1
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
3
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb)....
3
by: meetranjeesh | last post by:
Hi, Anybody experimented calling C# components from java applications? I'm facing problems with the same. Any clue's are most appreciated. Thanks in advance. Ranjeesh
1
by: amgupta8 | last post by:
Note: This problem occurred when I updated the JDK from 1.3.1 to 1.4.1 or 1.4.2. Nothing else was changed in the code, other than updating the JDK on the database server (dbm cfg parm jdk_path) and...
4
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
0
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.