Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Highlighted
andres_heredia Absent Member.
Absent Member.
814 views

cannot run cobol jvm classes after update java 8_51 to java 8_131

Jump to solution

Hi everyone,

I am doing some test from the recently published Visual Cobol ebook by Micro Focus, the test is simple, but I'm trying to understand what's is wrong when I upgrade the java 8 jdk version.

  • step 1 - create a HelloWorld.cbl with a simple sentence: display "Hello World"
  • step 2 - compile with cobol HelloWorld.cbl jvmgen;
  • step 3 - with java 8 update 51 run (from the Visual Cobol Command line 32 or 64 bits) the demo : java HelloWorld and runs ok
  • step 4 - uninstall java 8 update 51 and install java 8 update 131 (the latest), add the environment variables JAVA_HOME, CLASSPATH and add JAVA_HOME to the beginning of PATH variable
    • JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
    • CLASSPATH=%JAVA_HOME%\lib
    • PATH=%JAVA_HOME%\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Aheredia\AppData\Local\Microsoft\WindowsApps;
  • step 5: start a visual cobol command line (32 bits or 64 bits) and try to run the demo:
    • java HelloWorld fail to run with message Error: Could not find or load main class HelloWorld

Why I cannot update the java version on my system and keep running the jvm cobol classes? 

regards,

Andrés Mauricio Heredia G.
Software Engineer
EMA HOLDINGS S.A.S
Cali - Colombia

0 Likes
1 Solution

Accepted Solutions
RobertSales Absent Member.
Absent Member.

RE: cannot run cobol jvm classes after update java 8_51 to java 8_131

Jump to solution
Hi Andres, I think your 'classpath' needs to include the current directory, so something like:
CLASSPATH=.;%JAVA_HOME%\lib
Regards,
Robert.
2 Replies
RobertSales Absent Member.
Absent Member.

RE: cannot run cobol jvm classes after update java 8_51 to java 8_131

Jump to solution
Hi Andres, I think your 'classpath' needs to include the current directory, so something like:
CLASSPATH=.;%JAVA_HOME%\lib
Regards,
Robert.
andres_heredia Absent Member.
Absent Member.

RE: cannot run cobol jvm classes after update java 8_51 to java 8_131

Jump to solution
Hi Robert,

what a rookie error! thanks for help me to notice that. I complety forgot that!

thank you very much.
Andrés Mauricio Heredia G.
Software Engineer
EMA HOLDINGS S.A.S
Cali - Colombia

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.