Anda di halaman 1dari 2

11/10/2016

windowsActivexfromjavaapplication?StackOverflow

signup

login

tour

help

xDismiss

JointheStackOverflowCommunity
Stack Overflow is a community of 4.7 million
programmers, just like you, helping each other.
Join them it only takes a minute:
Signup

Activexfromjavaapplication?

IsitpossibletoeasilyembedActiveXcontrolsinJavaapplication?Isitworthit.InmynextprojectIshouldeitheruseexistingactivexinJavaapp
orhavetoreimplementeverythingfromscratch,soI'mwonderingwhatwillbelesshassle.
java windows activex
editedDec1'12at22:33

askedOct27'08at9:21

Marko
17.9k

12

59

99

3Answers

Idon'tthinkthere'sawaytodothiswithoutresortingtoathirdpartylibrary.(Orrollingyourown,
butyoudidsay"easily".)
SWT(The"StandardWidgetToolkit")containssupportforembeddingActiveXcontrols.SWTis
analternativetoSwing,thoughthereisadegreeofinteroperabilitybetweenthem.
Here's anexampleofembeddingWindowsMediaPlayerinanSWTwindow.
Alternativelythere'stheJacobproject,thoughIhaven'tusedthatmyself.
Asfor"isitworthit?"Well,IcansayfromexperiencethatSWTmakesitrelativelyeasy,but
unlessyourapplicationcangracefullydealwithnothavingthemavailable,byrelyingonCOM
componentsyouarelosingtheabilitytorunonmultipleplatformsthatmakesJavaattractivein
thefirstplace.
editedOct27'08at11:18

answeredOct27'08at10:26

alexmcchessers
655

11

16

Itreallydependsonhowmuchyouaregoingtohavetoreimplement.TheJacobprojectisquite
good(weuseitextensivelyforautomationofExcelandWord),butyouhavetoreally understand
COMtouseit,especiallythevagariesoftheIDispatchinterface(veryfewpeoplewhouse
ActiveX/COMactuallyunderstandCOMtheyjustrelyonMicrosoft'stemplategeneration).
IfyouarejusttryingtosaveyourselfsometypingforsomesimpleDAOobjects,you'llprobably
bebetteroffreimplementing(heck,youcouldprobablytaketheDTDandwriteascriptto
generateJavacodeforit).
answeredOct28'08at2:26

KevinDay
11.6k

23

50

http://www.codeproject.com/KB/crossplatform/javacom.aspx?msg=1776281mighthelpifyou're
willingtodostuffbyhand...

http://stackoverflow.com/questions/239395/activexfromjavaapplication

1/2

11/10/2016

windowsActivexfromjavaapplication?StackOverflow

Doesn'tseemquiteasflexiblethough...
editedFeb4'11at0:20

answeredFeb4'11at0:14

rogerdpack
22.5k

http://stackoverflow.com/questions/239395/activexfromjavaapplication

13

91

139

2/2

Anda mungkin juga menyukai