[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