Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:02:28+00:00 2026-06-12T18:02:28+00:00

Here is the C++ code: #import path\to\catia\intel_a\code\bin\InfTypeLib.tlb no_namespace // … ApplicationPtr catia; catia.CreateInstance(CATIA.Application); catia->PutVisible(VARIANT_TRUE);

  • 0

Here is the C++ code:

#import "path\to\catia\intel_a\code\bin\InfTypeLib.tlb" no_namespace

// ...

ApplicationPtr catia;

catia.CreateInstance("CATIA.Application");

catia->PutVisible(VARIANT_TRUE);

I want to call the same CATIA API in Java with com4j. According to com4j tutorial page, the Java definitions were generated by following command:

java -jar ..\..\tlbimp.jar -o catia -p catia InfTypeLib.tlb

But the result ClassFactory has no static methods to create COM objects.

import com4j.*;

/**
 * Defines methods to create COM objects
 */
public abstract class ClassFactory {
  private ClassFactory() {} // instanciation is not allowed
}

Then I tried another typelib ‘CATIAAppTypeLib.tlb’.

import com4j.*;

/**
 * Defines methods to create COM objects
 */
public abstract class ClassFactory {
  private ClassFactory() {} // instanciation is not allowed


  public static org.huys.catia.AppType._CATIAApp createCATIAAppObj() {
    return COM4J.createInstance( org.huys.catia.AppType._CATIAApp.class, "{5A29422A-F2B0-11D4-A3AA-00D0B756AD5D}" );
  }

  public static org.huys.catia.AppType.CATIAVBAHostingApplication createCATIAVBAHostingApplicationImpl() {
    return COM4J.createInstance( org.huys.catia.AppType.CATIAVBAHostingApplication.class, "{0663D095-471D-11D2-9AA3-00A024941EF0}" );
  }
}

When calling these methods in Java, I got

com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .\com4j.cpp:153

I cannot find the method to create an instance for the Application interface.

Can anyone help me for this? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:02:30+00:00Added an answer on June 12, 2026 at 6:02 pm

    The generated ClassFactory for InfTypeLib.tlb doesn’t contain the static method for creating instances of Application.

    This can be worked around by add the method manually.

    public static catia.Application createApplication() {
        return COM4J.createInstance( org.huys.catia.Application.class, "{87fd6f40-e252-11d5-8040-0010b5fa1031}" );
    }
    

    The GUID for “CATIA.Application” can be find in the registry. Or just replace it with the string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple code here import os path = (raw_input(Enter dir: )) f
Here's my code: #import <Foundation/Foundation.h> void PrintPathInfo() { const char *path = [@~ fileSystemRepresentation];
Here is the code: import javax.swing.SwingUtilities; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.event.*;
Here is my code: import javax.swing.*; import java.awt.*; public class PanelModel { public static
Here is my code import org.ksoap2.*; import org.ksoap2.serialization.*; import org.ksoap2.transport.*; import android.app.Activity; import android.os.Bundle;
Here is the code: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class TestGrid {
For some reason, I can't get pyglet to draw sprites. Here's my code: import
Here is some sample Python code: import re some_regex = re.compile(r\s+1\s+) result = some_regex.search(
Here I found this code: import java.awt.*; import javax.swing.*; public class FunWithPanels extends JFrame
Here is a simple piece of code: import java.io.*; public class Read { public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.