473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Calling Java Code

Jim
Can you call exisiting Java classes from C#?
Nov 15 '05 #1
6 12676
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.