Highlighted
Absent Member.
Absent Member.
1451 views

Problem executing a COBOL program with JVM as remote.

Jump to solution

Hello everyone,

I am facing a problem executing a COBOL program as java on a remote unix machine. I think I am missing a piece of information to properly set/execute my Hello World program. I am using VisualCOBOL 2.1 with eclipse.

I have created 2 projects, one local and the other one remote (HP-UX). On the local project (New->Cobol  JVM project), I have been able to New->Cobol Program, add a display call in the procedure division and executing the program.

On the remote project (New->Cobol Remote Project) I have added New->Cobol Program and added my display call in the procedure division. Meanwhile, attempting to execute my program generated the following error:

An internal error occurred during: "Launching HWJVM".
java.lang.NullPointerException


When I look at the Run Configuration, I can see that my local project will execute as a "COBOL Application" while my remote one as a "Java Application".

There might be someting missing in my settings. Any idea?

Is there a way to execute the generated .class file directly? If I try I receive an error saying that a main could not be found.

Thanks.

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: Problem executing a COBOL program with JVM as remote.

Jump to solution

Try using a COBOL Application launch configuration. Under connection Properties using the ip address of the remote host, XServer will be the address:0.0 of your local machine.  

To run a .class file on the HP machine you can try to open up a shell on the HP machine,  run cobsje then cobjrun (instead of java) that class file.

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: Problem executing a COBOL program with JVM as remote.

Jump to solution

Try using a COBOL Application launch configuration. Under connection Properties using the ip address of the remote host, XServer will be the address:0.0 of your local machine.  

To run a .class file on the HP machine you can try to open up a shell on the HP machine,  run cobsje then cobjrun (instead of java) that class file.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Problem executing a COBOL program with JVM as remote.

Jump to solution

Great!  Thanks ppimental, this is exactly the kind of information that I needed.

First, I was not aware of the cobjrun command, meaning that I have started my investigation with the improper documentation.  I have found some info now about it and have been able to execute my Hello World program.

Second, my Unix installation doesn't have the cobsje and I will need to investigate why.  I have found info referencing it on the web but my installation doesn't have this.

I have just find the connection properties of the Cobol Application launch configuration. For a normal Cobol application, the X Server is already set to my machine address with 0:0 port.  I don't understand what you wanted me to do, but I will try to read more about this subject.

Thanks for providing me those info that will help me to find the proper documentation.

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.