Highlighted
seaover Absent Member.
Absent Member.
1972 views

COBOL JVM Project

Jump to solution

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

Now I am testing Java and COBOL interface with Visual COBOL for Eclipse (windows).
I created COBOL JVM project and select "Property" on my created JVM project.
Then I added "Visual COBOL Runtime Systems" on "Library" tab of "Java Build Path".

Then I created New java program and COBOL program, by renzo presented in this forum.
I modified them to my environment as follows:

Content.java reads:


package com.myguru.coboljava;

public class Content {

private String content = "Initial value";

public void showContent(){
System.out.println(content);
}


public static void main(String[] args) {
Content content = new Content();
content.showContent();
}
}

testjava.cbl reads:

program-id. testjava as "testjava".

environment division.
configuration section.

data division.
working-storage section.

procedure division.
invoke type java.lang.System::out::println("help")
invoke type com.myguru.coboljava.Content::showContent()

goback.

end program testjava.

On the Eclipse source code screen of testjava.cbl, I saw two red small circles
marked with white x at front of invoke statement lines. when I put my cursor on
the first invoke statement, the tooltip say:

COBCH0814S Feature not Supported
COBCH0641S '.' missing following procedure name declaration or unrecognized verb
The tooltip for second invoke statement says:
COBCH0814S Feature not Supported
COBCH0301S unrecognized verb

When I build the project, I got following error message on console:
cfg.New_Configuration:
[cobol]
[cobol] Compiling testjava.cbl...
[cobol]
[cobol] Execution error : file 'mfjava'
[cobol] error code: 198, pc=0, call=1, seg=0
[cobol] 198 Load failure - can't initialize JVM
[cobol]
[cobol] Compilation complete with 0 errors, 0 warnings, 0 notices and an exit code of 32


BUILD FAILED
Build finished with 0 errors, 0 warnings, 0 notices and a maximum exit code of 32

C:\Documents and Settings\hpark\workspace\demojvm\.cobolBuild:130: Build errors have occurred

Total time: 1 second

Could anyone can help me to solve this error or help to build COBOL JVM project in correct way ?

Thanks
0 Likes
1 Solution

Accepted Solutions
Mark_Warren Absent Member.
Absent Member.

RE: COBOL JVM Project

Jump to solution
Hi Seaover,

I can help a little here. One of the reasons why the JVM support was marked as "Technical Preview" in Visual COBOL R3 was that we had some rough edges of the developer experience to clean up but we wanted to get it out early for user feedback ("deliver early, deliver often"). This includes the installation experience and the background parser in the editor.

Your first issue is exactly that, the R3 parser doesn't understand OO syntax so shows the red warnings in the editor even though the code compiles cleanly. So annoying rather than stopping you from working. This is fixed in R4.

I'm not sure what the second issue is. Hopefully someone else will join in to help but it could be that the installation of the JVM plug-ins wasn't completely successful. This is the other key issue addressed in R4 where the JVM support is installed automatically.
0 Likes
1 Reply
Mark_Warren Absent Member.
Absent Member.

RE: COBOL JVM Project

Jump to solution
Hi Seaover,

I can help a little here. One of the reasons why the JVM support was marked as "Technical Preview" in Visual COBOL R3 was that we had some rough edges of the developer experience to clean up but we wanted to get it out early for user feedback ("deliver early, deliver often"). This includes the installation experience and the background parser in the editor.

Your first issue is exactly that, the R3 parser doesn't understand OO syntax so shows the red warnings in the editor even though the code compiles cleanly. So annoying rather than stopping you from working. This is fixed in R4.

I'm not sure what the second issue is. Hopefully someone else will join in to help but it could be that the installation of the JVM plug-ins wasn't completely successful. This is the other key issue addressed in R4 where the JVM support is installed automatically.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.