473,320 Members | 1,914 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,320 software developers and data experts.

Call Java library using C#

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
4 6775
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: aychai | last post by:
Hi all, I am trying to make use Oracle9i db to call an external .Net Web Service from a JAva Stored Procedure. I created the .Net Web Service and use JDeveloper 9.0.3.4Build(1247) to create...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
5
by: Alex | last post by:
Hi all, I'm sure this is really really easy but I do need some help. I'm writing a java stored prcedure to manage the assignment of IP addresses to mac addresses for a network device database...
46
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or...
11
by: Rahul | last post by:
Hi Everyone, While working with Java, i came across super() which passes values to base class constructor from derived class constructor. I was wondering if this could be implemented in c++ by...
11
by: BigZero | last post by:
Hello, can i call Java method.That is java code from php,here what i m looking for i have class called DB in this class all the DB related things ,like DB connection DB insert,DB read etc...
5
by: Daniel | last post by:
Hi all, I have some questions regarding C#. I come from a Java background. I am using .NET 1.1. Please limit your answers to v 1.1, otherwise please state the version to which it applies to. ...
1
by: Ahmad Jalil Qarshi | last post by:
Hi, I am develop a dynamic link library in C on AIX that will internally call java functions using JNI. This libaray will be finally used by other C Executable. There is only one function in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.