java - com.jacob.com.ComFailException: Can't co-create object -


i'm using jacob load system certificate. working fine when run code using public static void main(string args[]) or simple java program when try run code using applet i'm getting error follow...

com.jacob.com.comfailexception: can't co-create object     @ com.jacob.com.dispatch.createinstancenative(native method)     @ com.jacob.com.dispatch.<init>(dispatch.java:99)     @ com.jacob.activex.activexcomponent.<init>(activexcomponent.java:58)     @ com.digicorp.root.systemwrapper$1.run(systemwrapper.java:23)     @ java.security.accesscontroller.doprivileged(native method)     @ com.digicorp.root.systemwrapper.<init>(systemwrapper.java:19)     @ com.digicorp.applet.digitalcertificateapplet.activexobject(digitalcertificateapplet.java:56)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source)     @ java.lang.reflect.method.invoke(unknown source)     @ sun.plugin.javascript.trampoline.invoke(unknown source)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source)     @ java.lang.reflect.method.invoke(unknown source)     @ sun.plugin.javascript.jsclassloader.invoke(unknown source)     @ sun.plugin2.liveconnect.javaclass$methodinfo.invoke(unknown source)     @ sun.plugin2.liveconnect.javaclass$memberbundle.invoke(unknown source)     @ sun.plugin2.liveconnect.javaclass.invoke0(unknown source)     @ sun.plugin2.liveconnect.javaclass.invoke(unknown source)     @ sun.plugin2.main.client.liveconnectsupport$perappletinfo$defaultinvocationdelegate.invoke(unknown source)     @ sun.plugin2.main.client.liveconnectsupport$perappletinfo$3.run(unknown source)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.plugin2.main.client.liveconnectsupport$perappletinfo.doobjectop(unknown source)     @ sun.plugin2.main.client.liveconnectsupport$perappletinfo$liveconnectworker.run(unknown source)     @ java.lang.thread.run(unknown source) 

i used http://netheadaches.wordpress.com/2012/04/22/jacob-cant-co-create-object/ solve above problem. solved simple java program while using applet same code giving error.

is there specific things have keep in mind while using jacob applet. i'm using jacob-1.17

activexcomponent comp=new activexcomponent("encryption.loadcertificate");

and found somewhere on internet...

 activexobj = (activexcomponent)accesscontroller.doprivileged(new privilegedaction<object>()               {                 public object run()                 {                   return new activexcomponent(systemwrapper.currentobjname);                 }               }); 

did take @ applet example coming jacob? download source , take @ it. can find in: samples\com\jacob\samples\applet. there readme.txt file in there. describes steps involved make jacob run in applet. in short:

  1. specify native lib in jnlp file (with nativelib href)
  2. sign jars (since java 1.7.0_17 has become mandatory)
  3. set permissions / use policy file

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -