Skip to main content

[Migrated content. Thread originally posted on 31 March 2011]

Hi,

I want to use a OO Cobol class, that belongs to a Cobol JVM Project, in a Java project with a Java GUI application.

I have exported the Cobol JVM Project to a .jar file, and then, I have imported it into the Java Project. But the Java class from the Java Project doesnt't find the OO Cobol class (for example when I do the "import ....").
In the "Package Explorer" tab from the Eclipse, I have seen that the Java Project have the .jar file (from the Cobol JVM Project) correctly referenced in the "Referenced Libraries" tag.

Do you know what is the problem?

Thanks

[Migrated content. Thread originally posted on 31 March 2011]

Hi,

I want to use a OO Cobol class, that belongs to a Cobol JVM Project, in a Java project with a Java GUI application.

I have exported the Cobol JVM Project to a .jar file, and then, I have imported it into the Java Project. But the Java class from the Java Project doesnt't find the OO Cobol class (for example when I do the "import ....").
In the "Package Explorer" tab from the Eclipse, I have seen that the Java Project have the .jar file (from the Cobol JVM Project) correctly referenced in the "Referenced Libraries" tag.

Do you know what is the problem?

Thanks
Hi,

You have to add the classpath as an additional directive in the Build Configuration.
Open the properties of your project, choose Micro Focus COBOL, Build Configuration and add the following in 'Additional directives' :

JVMCLASSPATH(path/to/classes/or/jars)

Regards,

Renzo

[Migrated content. Thread originally posted on 31 March 2011]

Hi,

I want to use a OO Cobol class, that belongs to a Cobol JVM Project, in a Java project with a Java GUI application.

I have exported the Cobol JVM Project to a .jar file, and then, I have imported it into the Java Project. But the Java class from the Java Project doesnt't find the OO Cobol class (for example when I do the "import ....").
In the "Package Explorer" tab from the Eclipse, I have seen that the Java Project have the .jar file (from the Cobol JVM Project) correctly referenced in the "Referenced Libraries" tag.

Do you know what is the problem?

Thanks
Hi,

You have to add the classpath as an additional directive in the Build Configuration.
Open the properties of your project, choose Micro Focus COBOL, Build Configuration and add the following in 'Additional directives' :

JVMCLASSPATH(path/to/classes/or/jars)

Regards,

Renzo