I've been assigned the task of translating an old ArcGIS VBA script into a Java add-in. I finished the rough translation of the code, now I'm starting the debug process. The first unit test I want to set up is the creation of an Application object. I'm getting the error "0x80040154 - Class not registered". Any ideas? I'm a very novice programmer so I'm open to any suggestions. Thank you.
Here's the code for my test:
@Test
public void testOnClick() {
try {
EngineInitializer.initializeEngine();
AoInitialize ao = new AoInitialize();
ao.initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
IApplication app = new Application();
assertNotNull(app);
}
catch (UnknownHostException e) {
System.out.println("UnknownHostException: " + e.toString());
}
catch (IOException e) {
System.out.println("IOException: " + e.toString());
}
}