By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,749 Members | 1,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,749 IT Pros & Developers. It's quick & easy.

Call Java library using C#

P: n/a
Hi there:

I am just wondering if I could call java library using C#. The reason to do
that is my application wants to automate OpenOffice and create document.

Thanks in advance

Alan
Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Alan,

I believe Java has the ability to export classes into COM objects. I
would do that. However, I can't imagine it would be too fast, since you are
going to interop through to unmanaged code on the .NET side, and then
marshal from COM to the java runtime.

If the document format is known, you might have better performance
manually creating the file yourself (if this is an issue for you, that is).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alan Wang" <wa**@vdata.com> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
Hi there:

I am just wondering if I could call java library using C#. The reason to
do that is my application wants to automate OpenOffice and create
document.

Thanks in advance

Alan

Nov 17 '05 #2

P: n/a
I tried and my program thrown exception "Cannot create ActiveX component."

Please help

Alan
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:e6**************@TK2MSFTNGP09.phx.gbl...
Alan,

I believe Java has the ability to export classes into COM objects. I
would do that. However, I can't imagine it would be too fast, since you
are going to interop through to unmanaged code on the .NET side, and then
marshal from COM to the java runtime.

If the document format is known, you might have better performance
manually creating the file yourself (if this is an issue for you, that
is).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alan Wang" <wa**@vdata.com> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
Hi there:

I am just wondering if I could call java library using C#. The reason to
do that is my application wants to automate OpenOffice and create
document.

Thanks in advance

Alan


Nov 17 '05 #3

P: n/a
Alan,

Did you create a COM interop wrapper? The java utility should be able
to export a type library which you need to set a reference to.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alan Wang" <wa**@vdata.com> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
I tried and my program thrown exception "Cannot create ActiveX component."

Please help

Alan
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:e6**************@TK2MSFTNGP09.phx.gbl...
Alan,

I believe Java has the ability to export classes into COM objects. I
would do that. However, I can't imagine it would be too fast, since you
are going to interop through to unmanaged code on the .NET side, and then
marshal from COM to the java runtime.

If the document format is known, you might have better performance
manually creating the file yourself (if this is an issue for you, that
is).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alan Wang" <wa**@vdata.com> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
Hi there:

I am just wondering if I could call java library using C#. The reason to
do that is my application wants to automate OpenOffice and create
document.

Thanks in advance

Alan



Nov 17 '05 #4

P: n/a
J-Integra Espresso allows for seamless Java/.NET interop. It is a100%
managed code solution and features SSL/TLS security (if required). For
a free evaluation, go to http://j-integra.intrinsyc.com/.

Shane Sauer
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
When Web Services are not enough

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.