?
Solved

JAVA/COM

Posted on 2001-06-23
9
Medium Priority
?
372 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month9 days, 12 hours left to enroll

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