I wanna get data from DOORS with Java. I found out that I can run DOORS using Jacob but it doesn't work. Can anyone please guide me to the solution even without using Jacob? I appreciate if someone can give me some specific code.
My code :
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.*;
String dxlFile = "" + appDir + "\\dxl\\transferTraceInfoToDOORS.dxl";
try {
//Try and get the active instance of doors first
ComThread.InitMTA();
//ActiveXComponent runningDoors = new ActiveXComponent("DOORS.Application");
ActiveXComponent runningDoors =
ActiveXComponent.connectToActiveInstance("DOORS.Application");
if( runningDoors ==null) {
JOptionPane.showMessageDialog(null,
"This application needs an active running instance of DOORS to work,
please fire DOORS up and try again");
System.exit(0);
} else {
runningDoors.invoke("RunStr", "print(\"Testing\");
oleSetResult(\"Finished\")");
//runningDoors.invoke("RunFile", dxlFile);
System.out.println(runningDoors.getPropertyAsString("Result"));
}
} catch (Exception e) {
e.printStackTrace();
} finally {
ComThread.Release();
}
This code works well when I use "Excel.Application", but with DOORS it doesn't detect the active instance So I got this message: "This application needs an active running instance of DOORS to work, please fire DOORS up and try again". Please help me. I couldn't found a solution.
Thank you.