Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 12 May 2013 04:06:11 -0500 From: "Chris Uppal" Newsgroups: comp.lang.java.programmer References: <825e44b1-bf36-4dfc-9d90-df4beffb7f7b@googlegroups.com> Subject: Re: Using JAVA inside VBA Date: Sun, 12 May 2013 10:02:02 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Message-ID: Lines: 35 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-n7L3i+9qp3q1Rh1S/eeyEHO8X7wzrNPNAcYR0hMQWmH5XPR+Mz13Hs+kS3qS1wiqpJek6c013BP4Uld!dvV302WsmZCUOQBH61DE94hg/rG70Y3VQqlfcZOW3Hu6OwwNdqo64axIrzaYrH5dIOm3H3PS+EA= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2533 Xref: csiph.com comp.lang.java.programmer:24012 Ghislain wrote: > Hello, > I have a compiled commercial jar that I want to use in VBA, something > Unforunately, I can't convert the API to a COM object. As far as I know, > it was possible 10 years ago but it is no longer possible unless you use > commercial products (like EZJCom). > > Do you have any ideas ? Buy the commercial product ? Wrap the JAR up in an executable that makes the API available over TCP/IP, and then create a COM object that uses that network interface ? If you are capable of developing simple COM objects in C++, then it might be simpler to use something like Jace: http://code.google.com/p/jace/wiki/Overview to create JNI-based wrapper code that your COM-server layer can talk to. Open Office / Libre Office used to be able to talk to Java, as I understand it. Maybe they still can, and it would be easier for you to use your existing commercial component with one of them. If you have the remarkably good sense, not to mention good fortune, to be a Smalltalk programmer, then you could use Dolphin Smalltalk (which can generate COM objects) + my very own (advt.) JNIPort to bridge between COM and Java... But buying the commercial product seems the best bet to me. After all, you've already paid for the two products you want to connect, why baulk at paying for the bridge too ? -- chris