Sun JDK 1.3.1 calling a Microsoft COM object???
My question, which inevitably in my eyes has been deemed impossible to answer, is as follows: How can one incorporate MS VM to connect to an MS COM object using Sun�s JDK 1.3.1?
I�ve tried the following: I ran the simple example of a COM object with a client interfacing with that COM object that came with MS SDK for Java 4.0. I built the *java files using the given makefile (jvc). I registered the Hub with javareg and created a hub.tlb with jactivex.
Using JBuilder 4.0, I built a small non-swing object that created in instance of the Client class from above:
import sample.dcom.*;
public class Main
public Main()
try
// MS Client � the Client class creates the COM object connection to HUB
Client client = new Client();
catch( Exception exception )
System.err.println("Default exception caught");
System.err.println(exception);
exception.printStackTrace();
I was able to compile/make the above snippet of code, but without having access to the com.ms* classes and without loading a library (since the Hub class actually references a native function), I was not able to run my application:
java.lang.UnsatisfiedLinkError: addListener
at hub.Hub.addListener(Native Method)
at sample.dcom.Client.<init>(Client.java)
at am.temp.Main.<init>(Main.java:30)
at am.temp.Main.main(Main.java:44)
However, if run the following command: jview Main, I get the necessary results. Which is what I thought would happen. I tried doing the same thing within a swing application, however, to my not-so-surprise, MS doesn�t contain swing components. I�ve read through many forum headaches: �I�ve tried appending rt.jar�, �You can�t mix MS with Sun�, etc.
Therefore, has anyone had any luck creating/connecting/instantiating a MS COM object while trying to run it under Sun�s VM? Note: I have to do it this way since the application I�m trying to connect to is built as a COM server and I�m using Java as my application language.
Thank you.
gui != COM.
In other words COM objects are not limited to GUI objects. From your question it looks like you have a COM object which is a gui component. And you want to use it in swing. If it is just a fancy drop down box then I would say the complexity isn't worth it. If it does more, then I believe that people have put 'windows' into swing frames. You can search this forum or perhaps the "Advanced Programming" (or even all forums) for more discussion on that.
Similar Messages
-
How do communicate with COM DLL(microsoft COM object written in VC++)
How do i communicate with a COM DLL(written in VC++ or VB) with a java program. The COM object has a method called dispPrint(String arg).
Or if you are like me, use a product like Jawin which simplifies things like this (no need to a intermediate dll).
http://staff.develop.com/halloway/code/jawin.html -
Calling COM object from an Applet
Hi,
Can an applet communicate with Microsoft COM object?
ThanxCheck out some software called JIntegra (commercial). Also, I think there used to be some sun stuff... but it got dropped... and then got picked up again... but I don't know what the status is on it.
-
I have client HTML forms sending info to the middle tier. On the middle tier are Microsoft COM objects that have the business logic. The middle tier is Windows NT.
Previously, Microsoft IIS was the applications server and ASP was used to access the COM objects.
How can I use Oracle9i Application Server to call the COM objects? I suppose that I could receive the client input in a java servlet and make CORBA calls via a CORBA-COM bridge to the COM objects. Is there a better solution? If I have to do the CORBA-COM, anything I should look out for? I suppose the performance can't be very good over that many layers.
nullHi John,
Thanks for the reply.
I have already looked into those topics which talks about Jintegra( com2java tool) and EZ Jcom .Basically these generate the java proxy classes, which is tedious to manage.
In asp we have something like Server.createObject(...). Is there anything similar to this in jspx?
Regards,
Asha -
Call MS com object via SOAP from WLS 6.1
I generated a WSDL file for a Microsoft com object and can easily write a WL
web service that calls it using Workshop 7.0. But I need to deploy it on a
WLS 6.1 server. (I was hoping that Workshop would simply generate the source
code required for accessing the com object via soap, which I could then cut
and paste into my own source, but it doesn't do that.)
Does anyone have an example of how to do this?Hi Mel,
You said that you want to "deploy it on WLS 6.1", but I think what you really
meant is that you want a J2EE component (i.e. JSP, Servlet, EJB, etc.) running
in WLS 6.1 to consume the WSDL you created from the COM object, right?
If so, the web services package in WLS 6.1 can be used to do this :-) If you tell
me what type of J2EE component (i.e. JSP, Servlet, EJB, etc.) you want to be the
client, I'll provide you with some sample code. Also, be sure you attach the WSDL
that was generated, because WLS 6.1's WSDL processor isn't as complete as the
one in WLS 7.0 and Workshop :-)
Regards,
Mike Wooten
"Mel Werbow" <[email protected]> wrote:
I generated a WSDL file for a Microsoft com object and can easily write
a WL
web service that calls it using Workshop 7.0. But I need to deploy it
on a
WLS 6.1 server. (I was hoping that Workshop would simply generate the
source
code required for accessing the com object via soap, which I could then
cut
and paste into my own source, but it doesn't do that.)
Does anyone have an example of how to do this? -
How can I call COM object in a servlet?
Hi,
Does oracle provide a bridge to call COM objects in a servlet? Is there any sample for doing this?
Thanks,
ArchieArchi,
Take a look at the following link:
http://technet.oracle.com/products/ids/daily/jul12.html
You can use J-Integra, one of JDeveloper's Extensions, in your Servlet to call any MS COM objects. -
Problem calling COM Object on Windows Server 2008 x64
Hi,
We are using 32 bits COM object called in Coldfusion page on 32 bits OS. It works fine since few years.
Now we need to use it on x64 Windows Server 2008 and 64bits IIS.
As I 've seen (http://www.coldfusionjedi.com/forums/messages.cfm?threadid=87869C67-B1 9B-288F-F32B6E8BAB3228CA ),a 64 bits process can only call 64 bits DLL.
So we created a 64 bits Wrapper like this : http://www.dnjonline.com/article.aspx?id=jun07_access3264
But calling 64 bits COM Object still raises the same error (" The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed") whereas it works fine with a 64 bits executable created in .NET for example.
Is there a known issue about this subject?
Sorry for english , I'm a french developper.
Thanks in advance.Can somebody please share the solution for this issue?
I am facing similar issue with Windows 2012 R2 x64 OS and Excel 2007(32-bit) combination.
I tried couple of things like Excel is able to Open an existing workbook on my system but fails to
create a new Workbook as done by invoking the "Add" command. It fails with Error 800a03ec.
I tried creating the two folders i.e. C:\Windows\SysWOW64\config\systemprofile\Desktop & C:\Windows\system32\config\systemprofile\Desktop, but could not get it working. -
Binary data problem with web services on JRockit but not Sun JDK
I have a problem with binary data in SOAP and JRockit
(jrrt-3.0.0-1.6.0-linux-x64.bin) . I have an set of web services based
on EJB 3.0 which return images as byte arrays inside a SOAP envelope
to be consumed by .NET 2 services. The host app server is Oracle
Application Server 10.3.1 on RHEL Linux update 4, on 64 bit Xeon 5500
series HP blade hardware.
While most images are fine most of the time, one particular image
gives this message when being consumed in the .NET client:
The '■' character, hexadecimal value 0x1F, cannot be included in a
name. Line 2, position 380038.
The MSDN suggests that this is usually caused by non-escaping of reserved XML characters like < but this isn't one of those.
The SOAP looks ok and for the life of me I can't see why this ought to
be a problem, especially since the problem doesn't arise running with
the SUN JDK 1.6_06 64 bit)
When making the same call from the OAS Enterprise Manager, I can make the same call with no problem (but the data is just rendered as character data in a browser) which maybe suggests some incompatibility with how JRockit is serializing the data ?
Any ideas, I would be very happy to hear - JRockit gives a 15% or so
speed boost to the website that these services power so obviously we
want to use it if possible.
Edited by: RichLiv on Nov 14, 2008 4:54 AMSeems to be the case that using MTOM stops this problem with JRockit. Strange but apparently true (so far).
-
Sun JDK installed on Fedora 8 but it is not there
I installed the Sun JDK SE rpm package on my Fedora 8 machine with installation instructions . But when I verify the installation by :
# java -version
I get,
java version "1.7.0"
IcedTea Runtime Environment (build 1.7.0-b21)
IcedTea Client VM (build 1.7.0-b21, mixed mode)
where as I expect (it shoud hhave been) something like:
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
The rpm query output shows me the installed JDK (jdk-1.6.0_05-fcs).
Have I missed something during installation? How can I get it working?Roedy Green [describes it|http://mindprod.com/jgloss/icedtea.html] as "Red Hat’s bundling of the OpenJDK version of Java for Linux. They can’t call it Java, JDK or OpenJDK because Sun has these trademarked. Red Hat can use the code, but not the trademarks under GPL."
Edited by: pbrockway2 on Apr 13, 2008 10:54 AM
[iced-tea.org|http://iced-tea.org/wiki/Main_Page] and its faq page might help you figure out what you can rely on when using this software. (Frankly, it didn't clarify things for me...) -
Java Generics in Ejbs WebLogic 9.2 MP1 WindowsXP Sun JDK
Hi guys,
I tried to deploy our application on Weblogic Server 9.2 MP1 (Windows, Sun JDK) and during deployment I have this error see bellow.
Can somebody tell me what is the problem with generics and EJB compiler?
Is necessary to add any path or change any server settings?
Thanks for help
Robert
location: interface
...daoadapter_DaoAdapter_rge4uk_Intf
public void batchPersist(java.util.List<T> arg0);
^
...daoadapter_DaoAdapter_rge4uk_Intf.java:20: cannot find symbol
symbol : class T
location: interface
2 errors
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:435)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:295)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:303)
at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:309)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497)
at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464)
at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:430)
at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:752)
at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:655)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1199)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperatio
n.java:189)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:15
7)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(Deploymen
tReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiv
erCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCal
lbackDeliverer.java:45)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)Thanks Matt for your answer.
But I don't finish my testing :)
I tried to deploy the same application on Weblogic 9.2 MP2 and then MP3 (sun jdk domain) and I didn't have problem with generics (application was correctly deployed and running).
Then something was fixed in newer versions or may be bea guys support more then is in EJB 2.x specification.
My next step, I'll try to deploy it on Jrockit domain and I give a note to conference what happen, may be it can help to somebody else.
Thanks
Robert -
Sun JDK 1.4.2.06 JCE Problems using SunRsaSign
I am getting the exception:
java.security.spec.InvalidKeySpecException: Key spec does not match the key.
at com.sun.rsajca.JSA_RSAKeyFactory.engineGetKeySpec(DashoA6275)
at java.security.KeyFactory.getKeySpec(KeyFactory.java:262)
at gov.dhs.client.https.security.SecurityHelper.createRSAToken(SecurityHelper.java:103)
at https.HttpsTestClient.testSecurity(HttpsTestClient.java:173)
at https.HttpsTestClient.main(HttpsTestClient.java:114)
Here is the code snippet that works in Sun JDK 1.5.0 but not in Sun JDK 1.4.2.06:
jceProvider = "SUN";
rsaProvider="SunRsaSign";
import java.security.Key;
import java.security.KeyFactory;
import java.security.spec.KeySpec;
import java.security.KeyStore;
import java.security.spec.RSAPrivateCrtKeySpec;
KeyStore ks = KeyStore.getInstance("JKS", jceProvider);
KeyFactory kf = KeyFactory.getInstance("RSA", rsaProvider);
ks.load(fis, jksPasswd);
fis.close();
Key K = ks.getKey(alias, jksPasswd);
KeySpec pvtSpec = kf.getKeySpec(K, RSAPrivateCrtKeySpec.class);
Obviously, there are differences in the implementation between the 2 JDKs. Does anyone out there have any experience with KeySpec in 1.4.2.06 that could shed some light?
Happy to follow up with any extra information on request.
Thanks for looking
David (LuvJava)Did you ever get HttpClient from Apache to work with NTLM? Our company has't standardized on 1.4.2 yet, so I'm stuck getting it to work with 1.4.1.
Any help would be greatly appreciated.
If this is a repeat post, I apologize
Dave -
Difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07
difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07 and I want to the link in SUN for that. I want to know the bug fixes between them.
Perhaps you should look at the documentation which comes with JDK 1.4.2_08.
It has the bugs fixed listed. -
[SOLVED] Dependency problems Sun JDK, OpenJDK and Soprano
Hi there,
as I need the Sun JDK for programming, I wanted to replace OpenJDK with SunJDK. Here's what's happening:
schorsch@archie:~$ sudo pacman -S jdk
resolving dependencies...
looking for inter-conflicts...
:: jdk conflicts with openjdk6. Remove openjdk6? [Y/n] Y
error: failed to prepare transaction (could not satisfy dependencies)
:: jdk: requires jre
:: soprano: requires openjdk6
schorsch@archie:~$
What's the proper way to do this? Should I avoid having more than one java version installed on my machine? I guess so...
I'm doing quite a bit of java development and sometimes really need the latest Sun Java.
TIA,
Blackhole
Last edited by blackhole (2009-02-18 18:56:53)Okay guys, I did a "pacman -Rd openjdk6 && pacman -S jdk" which worked fine:
schorsch@archie:~$ java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
schorsch@archie:~$
However when I use Konqueror and go to http://www.java.com/en/download/help/testvm.xml in order to test my java version, it doesn't work.
More precisely the applet is not displayed at all. When I go to the Konqueror settings and to "Java & JavaScript", tick the checkbox "Use KIO" and refresh the page. I at least get a big gray square where the applet should be.
Do I have to install any additional java plugin? Is anybody out there using Konqueror with the Sun Jre?
//Edit: I've come across this: http://www.konqueror.org/javahowto/ but I was wondering whether this is already included in some Arch package. I don't wanna fiddle manually if there's a proper Arch way to do things.
TIA,
Blackhole
Last edited by blackhole (2009-02-18 13:58:17) -
Revision: 11488
Author: [email protected]
Date: 2009-11-05 17:10:10 -0800 (Thu, 05 Nov 2009)
Log Message:
Resubmitting binary distribution of xercesPatch.jar from the third party module in the SDK and compiled it with Sun JDK 1.4.2_12.
QE notes: N/A
Doc notes: N/A
Bugs:
SDK-16818 - Must open-source the code for xercesPatch.jar.
Reviewer: Discussed with Gordon
Tests run: Checkintests
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16818
Modified Paths:
flex/sdk/trunk/lib/xercesPatch.jar
flex/sdk/trunk/modules/thirdparty/xerces-patch/build.xmlDid you try this:
http://forum.java.sun.com/thread.jsp?thread=434718&forum=60&message=1964421 -
Different complining result between SUN JDK 1.4 and IBM JDK 1.3.1
Hi! I simplifed my code as following:
public class TestException2 {
public Object test() {
java.sql.Connection cn = null;
try {
// 1st. close
cn.close();
catch (java.sql.SQLException se) {
// 2nd. close
cn.close();
finally {
return new Object();
}But I get different compiling result betwueen SUN JDK 1.4.2 and IBM JDK 1.3.1 (I have to deploied my app to the websphere 5.0)
In Sun JDK 1.4.2, I only got a warning:
[e:\work\test]javac TestException2.java
TestException2.java:14: warning: finally clause cannot complete normally
^
1 warningIn IBM JDK 1.3.1, I got an error:
TestException2.java:10: unreported exception java.sql.SQLException; must be caught or declared to be
thrown
cn.close();
^
1 errorWhat happend? Who is right?
Thank you!
[ I believe the code should not pass the compilation ... ]Many other people agree with you, including some Sun engineers.
Perhaps Sun just feels an obligation to continue to allow it for legacy reasons.
You might also investigate the compiler that comes with Eclipse.
http://www.eclipse.org/
It has a more flexible approach: for some cases, it lets you decide what is a warning and what is an error.
Maybe you are looking for
-
BUG: Popup in page fragment; with many regions and popup binded to backing.
BUG: Popup in page fragment; with many regions and popup or parent binded to backing bean. JDEV11.1.2.1 Popup will not popup.(sometimes works if using RichPopup.Show() in backing bean Java code.) I have a bug (Popup will not popup)that only happens w
-
Help! How do I get rid of 10,000 duplicates???
PLEASE can anybody help me? Whenever I change computer, reload the operating system or load itunes updates I end up with SEVERAL THOUSAND duplicated items. Sometimes it is just two tracks per album, sometimes up to TWENTY or so. I have to go through
-
I have a new iMac. I'm using Migration Assistant to transfer files. My old computer spontaneously shut down. I restarted it and am trying to use Migration Asst again, but each computer is waiting on input from the other one. What do I do?
-
Install error 1722 and Custom Install fails too
I'm installing Java 1.5 (the 16MB offline) and/or the 235K online, problem is the same either way. I am installing on NT4.0 server sp6a. When I choose Custom install, and go to the next screen. The Change button is disabled. So I cannot change the in
-
OS 10.6.8 Safari 5.1.10 Firefox 12.0.2 Sophos AV 9.1.5 Have a gift card from Lowes. Want to see the balance. Went to their gift card site and input number, pin, and captcha. Received message "Invalid information entered. Try again." This occurs