Something must have been corrupted in my environment. I created a brand new project, copied all the java source files into it, added JACOB as a library, and the error disappeared. Belay that - the errors are still present. Do I even need that ComThread.InitMTA() statement?
Something must have been corrupted in my environment. I created a brand new project, copied all the java source files into it, added JACOB as a library, and the error disappeared.
I'm trying to develop a utility to interface with an ASCOM device using JACOB. But as soon as the program executes the ComThread.InitMTA() statement, this is displayed in the console window: WARNING: A restricted method in java.lang.System has been called WARNING: java.lang.System::load has been called by com.jacob.com.LibraryLoader in an unnamed module (file:/D:/Documents/Java%20Projects/jacob-1.21/jacob.jar) WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this...
I have a desktop application developed in Java, I am creating an email with HTML body then saving it as "email.msg", and immediately open that email file in Outlook application using JACOB. Here is the code: //initiate the email private boolean sendEmailViaOutlook(Data data) { boolean emailSent; OutlookEmail jacobOutlook = new OutlookEmail(); ActiveXComponent axOutlook = new ActiveXComponent("Outlook.Application"); try { jacobOutlook.oOutlook = axOutlook.getObject(); Dispatch oNameSpace = axOutlook.getProperty("Session").toDispatch();...
I have a desktop application developed in Java, I am creating an email with HTML body then saving it as "email.msg", and immediately open that email file in Outlook application using JACOB. Here is the code: private boolean sendEmailViaOutlook(Data data) { boolean emailSent; OutlookEmail jacobOutlook = new OutlookEmail(); ActiveXComponent axOutlook = new ActiveXComponent("Outlook.Application"); try { jacobOutlook.oOutlook = axOutlook.getObject(); Dispatch oNameSpace = axOutlook.getProperty("Session").toDispatch();...
I need to Dispatch this statement: oHyperlinks.invoke("Add",oSelectionRange,new Variant(emailaddress)); This is an hyperlink in an table-cell
Please help me. Have a good life
Attached is the effect drawing I generated
I tried to add the title of the table in word, which has been successfully added, but the title is left aligned by default, I want to center align the title, how to operate. I tried a lot of things, but it didn't work. Somebody can help me. Here is my code to add a caption at the top of the table Dispatch table = Dispatch.call(tables, "Item", i).toDispatch(); // 获取第i个表格 Dispatch selection = Dispatch.get(table, "Range").toDispatch(); // 获取表格范围 Dispatch.call(selection, "Collapse", new Variant(0));...
Long time ago, but still the same problem! The problem is not the last parameter: 2. It's the missing PrintRange parameter. The parameter is optional, but check this: https://sourceforge.net/p/pywin32/bugs/339/ (It defines "[in, optional, defaultvalue(0)] PrintRange* PrintRange" which leads to the generation of "PrintRange=0") Same problem for jacob. I had the same problem and solved it like this: Dispatch printOptions = Dispatch.get(presentation, "PrintOptions").toDispatch(); Dispatch ranges = Dispatch.get(printOptions,...
Its also interesting that memory is consumed by JVM, but not by Heap. Heap is stable. JVM's consumption is not.
I wonder if source of my problem can be the design when I call some COM method via Dispatch in the same thread which delivers events from DispatchEvents to me?
Its interesting to add, that Runtime.getRuntime().freeMemory() is not showing the memory leak. That memory is more or less stable. While JVM memory consumption I see in Windows / Task Manager is growing quite fast.
Hello everyone, please help me with a typical issue. I have tried several suggested solutions, but they fail. Setup: JVM 1.8, Jacob 20, x64 I have a code which is using DispatchEvents class. Many events come to my side from server, which is ActiveXComponent. Events are represented as Variants. Events a delivered to Callback class by many threads. The problem is that Variants are never cleaned up. I tried to use -Dcom.jacob.autogc=true - no effect ComThread.InitSTA and ComThread.Release - JVM dies...
Sr, you're my hero
I know its several months after your question, but try taking a look a this answer. https://stackoverflow.com/questions/65125191/exception-access-violation-in-jacob-dll-using-vm-in-jenkins-pipeline It's says that maybe you should try to downgrade your java build to 141 and see if it works.
I know its several months after your question but, try taking a look a this answer. https://stackoverflow.com/questions/65125191/exception-access-violation-in-jacob-dll-using-vm-in-jenkins-pipeline It's says that maybe you should try to downgrade your java build to 141 and see if it works.
We are using jdk version 8.282.08.1 and jacob version 20. But after running the application we get below issue : 'release' '()V' in 'com/jacob/com/Dispatch' Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j com.jacob.com.Dispatch.release()V+0 j com.jacob.com.Dispatch.safeRelease()V+12 j com.jacob.com.Dispatch.finalize()V+1 J 6862% C2 java.lang.ref.Finalizer$FinalizerThread.run()V This issue comes on windows 2012 and 2012 R2 machine. Could you please suggest possible reason for sam...
We are using jdk version 8.282.08.1 and jacob version 20. But after running the application we get below issue : EXCEPTION_ACCESS_VIOLATION 'release' '()V' in 'com/jacob/com/Dispatch' Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j com.jacob.com.Dispatch.release()V+0 j com.jacob.com.Dispatch.safeRelease()V+12 j com.jacob.com.Dispatch.finalize()V+1 J 6862% C2 java.lang.ref.Finalizer$FinalizerThread.run()V This issue comes on windows 2012 and 2012 R2 machine only. It works fine on...
We use Jacob in the multi-threaded mode. In the case when the network connection is unstable (hence, data loss can occur), we have the following problem: During operation, the program execution occasionally hangs in the Java_com_jacob_com_EnumVariant_release(), line: ULONG refs = self-> Release(). This "hung" state is always preceded by the occurrence of a ThrowComFail in the Java_com_jacob_com_EnumVariant_Next() method. To emulate a bad network connection, we used https://jagt.github.io/clumsy/....
I found out the reason. The thread (from thread pool of application server) that created the instance was removed from the thread pool. It seems that a COM instance has the context of the thread and lives as long as the thread, that created it.
We are using JACOB in a web application (JSF, JPA, Wildfly Application Server, OpenJDK) to interact with another c/c++ application. Our problem is that after 1-2 minutes of inactivity the instance of the C++-COM-Dll is cleaned up and the destructor is called. This behaviour is reproducable not every time, but quite often. After the instance was cleaned up, a call of invokeev (Dispatch.cpp) ends up in an "Can't map name to dispid" error. The finalize() or safeRelease() method of the ActiveXComponent-instance...
ActiveXComponent excel = new ActiveXComponent("Excel.Application"); Dispatch workbooks = excel.getProperty("Workbooks").toDispatch(); Dispatch workBook = Dispatch.call(workbooks, "Open", file.getAbsolutePath()).toDispatch(); Dispatch sheets = Dispatch.get(workBook, "Worksheets").toDispatch(); Dispatch workSheet = Dispatch.call(sheets, "Item", 1).toDispatch(); Dispatch cell = Dispatch.call(workSheet, "Cells", 1).toDispatch(); Object takingValue = Dispatch.get(cell, "Value") Dispatch.put(cell, "Value",...
I myself was able to find it. Dispatch.put(oMailItem, "UnRead", "false");
Could you show me sample code of making email as 'Read'. I am saving email after sending it successfully in Sent Items folder but it is saving as Unread. I want to mark it as Read. Please let me know the possible code.
jacob 1.18 (tried 1.20 too). A call of this method: [id(0x60020003)] HRESULT GetFacesAt( [in] BSTR point, [in] ICoordinateSystem coordinateSystem, [out, retval] SAFEARRAY(ISimObject)* pRetVal); should return an array of dispatches. But evaluating the returned result throws an jacob exception "java.lang.IllegalStateException: "getDispatch() only legal on Variants of type VariantDispatch, not -19488". Obviously the variants do not contain dispatches. The type of the variant returned from the method...
Please ignore the issue. I figured out myself. I was missing a api call.
Hello, I am using jacob to access ALM OTA to upload external results file . Script is failing on line - Dispatch.call(attachFactory,"FileName",new Variant(Report)).toDispatch(); Error - Exception in thread "main" com.jacob.com.ComFailException: Can't map name to dispid: FileName I would appreciate if someone can help me with this issue? Implementation Code in VBScript set tdc = createobject("TDApiOle80.TDConnection") tdc.InitConnectionEx "http://xxxx:8080/qcbin" tdc.Login "xxxxxx","xxxxxxxxx" tdc.Connect...
Hello, I am using jacob to access ALM OTA to upload external results file . Script is failing on line 111. Please look at code after this line - * /// Script is failing on this step. Here i have to set to FileName with path to the file /// - Please look for this line Implementation Code in VBScript set tdc = createobject("TDApiOle80.TDConnection") tdc.InitConnectionEx "http://xxxx:8080/qcbin" tdc.Login "xxxxxx","xxxxxxxxx" tdc.Connect "xxxx","xxxxxx" If tdc.Connected = true Then print "Connect successful!!!"...
Your change has been merged and is available in version 1.20 no avaialble on GitHub
I use JACOB to connect to OPC library (OPCDAAuto.dll) and it has methods with timestamp array functionality.
Source code and Binares have moved to https://github.com/freemansoft/jacob-project Releases are available https://github.com/freemansoft/jacob-project/releases Bug reports, Enhancement Requests and Patches topic messages have been purged from Sourceforge
Source code and Binares have moved to https://github.com/freemansoft/jacob-project Releases are available https://github.com/freemansoft/jacob-project/releases Bug reports, Enhancement Requests and Patches topic messages have been purged from Sourceforge
Source code and Binares have moved to https://github.com/freemansoft/jacob-project Bug reports, Enhancement Requests and Patches topic messages have been purged from Sourceforge
Source code and Binares have moved to https://github.com/freemansoft/jacob-project Bug reports, Enhancement Requests and Patches topic messages have been purged from Sourceforge
Source code and Binares have moved to https://github.com/freemansoft/jacob-project
Source code and Binares have moved to https://github.com/freemansoft/jacob-project
all binaries are gone
The source repository has moved to GitHub
leaving behind only README.md
removing source from sourceforge
The source repository has moved to GitHub
moved jacob to the top
removing jacobgen
MR1 updated docks for SF Merge Request 1
Support VT_DATE getting from SafeArray
Merge /u/alexeykachalov/jacob-project/ branch master into master
Feature Request 48 - Update build to Visual Studio 2019 and Win 10 kit
convert docs from html to md
My kingdom for a test case!
Hi, I would like to create and send mail with outlook Application which body contains all the content of a Word document with the format - copy and paste. I can create, send a mail and copy each paragraph of the document Word but the text is pasted without format. I would like to copy the content as it appears in the Word document. thank's for your help cpf
Hi, I would like to create and send mail with outlook Application which body is all the content of document with the format - copy and paste. I can create, send a mail and copy each paragraph of the document Word but the text is pasted without format. I would like to copy the content as it appears in the Word document. thank's for your help cpf
Hi, I will to create and send mail with outlook Application witch body is all the content of document with the format - copy and paste. I can create, send a mail and copy each paragraph of the document Word but the text is pasted without format. I would like to copy the content as it appears in the Word document. thank's for your help cpf
Hello, I made Intelij maven project, I used Jacob library in it. When I run project from Intelij, everything works fine, but when I build jar file, and try to run it from windows explorer, nothing happens. Please help. I use jacob 1.19 and java 11.
Hi, 1) I've been trying to read the documentation to figure out what JACOB actually does and I have no idea. What does JACOB do? 2) It seems like it automates java programs using activex as an interface. This can be used for testing and automation. When I went into the documentation it presented an activex component which takes a dispatch object or a program id. Where do I get the program ID from? I also dont really understand how the dispatch object works.
One of our legacy application using Jacozoom for long while but recently facing issues only on Windows10 machines. So we need to know, how feasible to migrate JACOB and is it support Windows10?
One of our legacy application using Jacozoom for long while but recently facing some issues only on Windows10 machines. So we need to know, how feasible to migrate JACOB and is it support Windows10?
One of our legacy application using Jacozoom for long while but recently facing some issues only on Windows10 machines. So we need to know, how feasible to migrate to JACOB and is it support Windows10?
Hi, I want to use Jacob java api but I’m using MAC for development. Could you share installation process ? Regards, Praveenbabu
I need to display a COM component derived from IE Browser Control in JFrame. Is there any way to do it with JACOB?
I need to display a COM component derived from IE Browser Control in JFrame. Is there a way to do it with JACOB?
Your thread got me quite far but im stuck here aswell not even sure if someone uses this technology yet
Im trying to read windows registry key using Jacob i was able to advance nicely reading the services and processes but with registry im stuck im using the reference of StdRegValue class from here: here and i have the following lines int HKEY_LOCAL_MACHINE = 0x80000002; String strKeyPath = "SYSTEM\\CurrentControlSet\\Services"; String [] sNames = new String [5]; ActiveXComponent wmi = new ActiveXComponent("WbemScripting.SWbemLocator"); // no connection parameters means to connect to the local machine...
Presently this is not overridden at all from java.lang.Throwable. It would help debugging a lot if it could be overridden such that if the hResult attribute is non-zero it is displayed in hex, so that we can see immediately whether it is E_INVALIDARG etc. as per https://docs.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values. Some link to this page in the Javadoc would be even nicer. This also applies to getMessage() of course, or maybe only to getMessage(), depending on how Throwable.toString()...
Presently this is not overridden at all from java.lang.Throwable. It would help debugging a lot if it could be overridden such that if the hResult attribute is non-zero it is displayed in hex, so that we can see immediately whether it is E_INVALIDARG etc. as per https://docs.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values. Some link to this page in the Javadoc would be even nicer.
Is there a way to set the "jacob.dll.path" property before the applet starts?
IBM has this to say about the issue: http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1PO06134
We use a provincial government application that is based on IBM Curam. It uses the Jacob library to send documents to Word. The application was recently updated. Since the upgrade a jabob folder gets created on our user's desktops whenever they edit a letter. Is there a way to stop this from happening? Thanks.
I need send email from non default outlook account and trying to set up SendUsingAccount property for this purpose. But code no take effect. Always default acc used here my code: import com.jacob.activeX.ActiveXComponent; import com.jacob.com.Variant; public class OutlookMail { private ActiveXComponent axOutlook; private ActiveXComponent axNamespace; private ActiveXComponent axAccounts; private ActiveXComponent axAccount; private int email; public OutlookMail() { email = 0; axOutlook = new ActiveXComponent("Outlook.Application");...
Hello, We are using JACOB as part of BCL easyPDF service package, Recently we noticed a very weird case where the Java thread is stuck forever on a JACOB method. The only work around we have now is to restart the BCL windows service. I am attaching Java thread dump and used JACOB files, Do you have any suggestions? Thread dump: "RMI TCP Connection(5274)-10.50.1.156" - Thread t@118559 java.lang.Thread.State: RUNNABLE * at com.jacob.com.Dispatch.invokev(Native Method)* at com.jacob.com.Dispatch.invokeSubv(Dispatch.java:344)...
Hi, I have a macro in which there is a function which returns a value. I want to access that value in java code. Can anyone please help me doing this?
moved to another thread https://sourceforge.net/p/jacob-project/discussion/375946/thread/b6b001753f/
I have a system that has Windows COM interface so that external applications can connect to it and it has following details Interface: InterfaceName Flags: (1234) Dual OleAutomation Dispatchable GUID: {ABCDEFG-ABCD-1234-ABCD-ABCDE1234} I'd like to connect to this interface through Java Spring Application, it will sends a request to this interface and process the response. I've tried to use the following code ActiveXComponent mf = new ActiveXComponent("ApplicationName.InterfaceName"); try { Dispatch...
I have a system that has Windows COM interface so that external applications can connect to it and it has following details Interface: InterfaceName Flags: (1234) Dual OleAutomation Dispatchable GUID: {ABCDEFG-ABCD-1234-ABCD-ABCDE1234} I'd like to connect to this interface through Java Spring Application, it will sends a request to this interface and process the response. I've tried to use the following code ActiveXComponent mf = new ActiveXComponent("ApplicationName.InterfaceName"); try { Dispatch...
Support VT_DATE getting from SafeArray
I am using JDK 1.7 64 bit and JCOB dll 64 bit version 1.17. Both are 64 bit and using Windows Server 12 R2. And web server tomcat apache-tomcat-7.0.47 Sometime it is working, some not working. Got the following error. com.jacob.com.ComFailException: Can't co-create object at com.jacob.com.Dispatch.createInstanceNative(Native Method) ~[jacob-1.17.jar:na] at com.jacob.com.Dispatch.(Dispatch.java:99) ~[jacob-1.17.jar:na] at com.jacob.activeX.ActiveXComponent.(ActiveXComponent.java:58) ~[jacob-1.17.jar:na]...
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII have a Java application running on Tomcat which needs to generate an email to Outlook on the connecting client's computer. Currently my code is always directing the email to Outlook on the server where tomcat is running and not to the connecting client. I have attached the code that I am using to connect to Outlook below. Any help to achieve this will be appreciated. Stack Overflow sign up log in Questions Jobs Tags Users Badges...
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII have a Java application running on Tomcat which needs to generate an email to Outlook on the connecting client's computer. Currently my code is always directing the email to Outlook on the server where tomcat is running and not to the connecting client. I have attached the code that I am using to connect to Outlook below. Any help to achieve this will be appreciated. Stack Overflow sign up log in Questions Jobs Tags Users Badges Ask...
I have a Java application running on Tomcat which needs to generate an email to Outlook on the connecting client's computer. Currently my code is always directing the email to Outlook on the server where tomcat is running and not to the connecting client. I have attached the code that I am using to connect to Outlook below. Any help to achieve this will be appreciated.
could you also share the excel sheet with subrutine DoIt