Skip to main content

Unable to run mfant.jar

  • June 5, 2021
  • 2 replies
  • 0 views

Dominique Sacre
Forum|alt.badge.img+2

Hi there

I have Visual Cobol for Eclipse 6.0 installed in my PC. I wanted to build my project from command line instead of using Eclipse IDE. I am trying to write a script which can automate the build in my local PC. 

I have the mfant.jar in the following location "C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin" and I do have bin64 folder "C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin64" in which i don't have the jar file. So i marked the bin folder in Classpath and tried executing the below command

C:\\project1\\> ant mfant.jar -f .cobolBuild -DforceCompile=false
Focus\\Visual was unexpected at this time.

Please advice on how we can build the project from command line. 

My PC info

64-bit operating system - Windows 10 - Build 1909


#VisualCOBOLEclipse
#VisualCOBOL

2 replies

Blair McDonald
Forum|alt.badge.img+1

Hi there

I have Visual Cobol for Eclipse 6.0 installed in my PC. I wanted to build my project from command line instead of using Eclipse IDE. I am trying to write a script which can automate the build in my local PC. 

I have the mfant.jar in the following location "C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin" and I do have bin64 folder "C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin64" in which i don't have the jar file. So i marked the bin folder in Classpath and tried executing the below command

C:\\project1\\> ant mfant.jar -f .cobolBuild -DforceCompile=false
Focus\\Visual was unexpected at this time.

Please advice on how we can build the project from command line. 

My PC info

64-bit operating system - Windows 10 - Build 1909


#VisualCOBOLEclipse
#VisualCOBOL

It looks like your ant command may be (at least) missing the -lib option. Here's an example:

 

ant -lib "%ProgramFiles(x86)%\\Micro Focus\\Visual COBOL\\bin\\mfant.jar" -f .cobolBuild

 

 

You might want to review this page in the Visual COBOL for Eclipse documentation, which describes the steps to build with ant from the command line.


Dominique Sacre
Forum|alt.badge.img+2

It looks like your ant command may be (at least) missing the -lib option. Here's an example:

 

ant -lib "%ProgramFiles(x86)%\\Micro Focus\\Visual COBOL\\bin\\mfant.jar" -f .cobolBuild

 

 

You might want to review this page in the Visual COBOL for Eclipse documentation, which describes the steps to build with ant from the command line.

Thanks.

I did the following and it worked for me 

1. There were few quotes in the Path environment var. I removed it 

2. And I changed my ant command as below

ant -f .cobolbuild -lib "C:\\Progra~2\\Micro Focus\\Visual COBOL\\bin\\mfant.jar" cobolbuild