Solved

JAVA/COM

Posted on 2001-06-23
9
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Expert Comment

by:reemau
ID: 6223164
use class.loadlibrary()
0
 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse buid path vs tomcat lib path 10 48
Selenium docs api java index 3 96
Need Help! Getting a syntax error and don't understand why 3 54
Java array sort 10 62
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

739 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