Solved

JAVA/COM

Posted on 2001-06-23
9
351 Views
Last Modified: 2010-03-31
Is it possible for a java program/code to access/use COM? How can this be done?
0
Comment
Question by:catty
9 Comments
 
LVL 3

Expert Comment

by:rjackman
ID: 6222555
hi
there
it's possible
wjat u can have is the bridge that communicates betwwen the java and the com
u can download one such bridge from
www.linar.com

http://users.rcn.com/danadler/jacob/
http://service2.boulder.ibm.com/devcon/news0799/artpage7.htm
http://sourceforge.net/projects/jcom/
i had tested the linar product it's good
but u will get teh eval version of it
Cheers
RJ
0
 

Expert Comment

by:ImrML
ID: 6222655
Hi,
rjackman are you promoting somebody's product?
Anyway, the problem could be solved by laoding the library(COM) with System oject and using thru native method declartion without body that is ending with semicolon.

ImrML
0
 

Author Comment

by:catty
ID: 6222988
Hi ImrML,

I'm not really familiar... can you elaborate or provide and example on what you said?

Thanks.
0
 

Expert Comment

by:reemau
ID: 6223164
use class.loadlibrary()
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Expert Comment

by:hakob
ID: 6223491
Look the chapter "Building and Importing COM Objects"

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vjcore98/html/vjovrbuildingimportingcomobjects.asp

in the Microsoft VJ++ programmers guide.
0
 
LVL 3

Expert Comment

by:rjackman
ID: 6223643
hi
 ImrML
let me specify 1 thing i am not at all promoting any 1's product i had just given my personal experience about the product and this is upo to the person whether to use it or not my aim was just to help our friend
also regarding ur solution
this is only possible when u are creating the DLL that time ushould have the native method in ur program that will be of the dll
but if u are using the dll which is already present the u have to use the java-com bridge
cheers
RJ
0
 

Expert Comment

by:wizarx
ID: 6226526
This is possible. There are 2 parts to achieving this:

1. Register the COM object by typing at the command line:

     javareg /register /class:COM_CLASS_NAME /progid:LOOKUP_KEY

(this javareg can be obtained by downloading the MS jdk available at
http://www.microsoft.com/java/ )

2. Use rmi to look up COM object registered in windows using the progid
as lookup key.

0
 

Expert Comment

by:ImrML
ID: 6237160
Hi catty,
If your problem is not yet solved then let me know what exactly you want and if you have COM with you then send me the dll with the prog id and method you wanna access.
I would publish the solution.
Thanks
ImrML
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8289482
All,
I am unlocking this question in preparation for cleanup.  I will return in 7 days to finalize this question.  Please leave any recommendations for the final state of this question, I will take all recommendations into consideration.  Failing any feedback, I may decide in 7 days to delete or PAQ this question with no refund.  Thanks.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countHi2 challenge 7 44
What is JNDI datasource in spring 1 38
java  and programming certification ? 4 65
recursion example 16 70
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now