Open sundar-sarvam opened 11 months ago
Hi @sundar-sarvam ,
the problem is that in your setup the ANTLR library is not on the class path as a dependency.
This project uses Maven for dependency management. When importing the code into Eclipse or Intellij IDEA, those IDEs should automatically recognize the Maven pom.xml and fetch all dependencies, including ANTLR as configured in here.
To my understanding you try to use Visual Studio Code for Java here -> support for larger Maven projects in Visual Studio Code was problematic for me in the past -> I definitely recommend Intellij or Eclipse!
Best Ulrich
Thanks @uwol . I realised that for some reason Proleap-cobol-parser-sources.jar
wasn't importable (tried different ways: created a java project, maven project and tried to add dependencies, copied the .jars to lib
directory of the workspace, etc. but didn't work). At the end, I download jar for ANTLR4 and slf4j-api separately and then the ANTLR issue got resolved.
But now I am facing the below warning:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Level Number: 1
On referring this link: https://www.slf4j.org/codes.html#StaticLoggerBinder, it seems to not be an issue (right?).
I am new to Java but very comfortable with VSC, so can't change IDE so easily. I am able to successfully run this example: https://stackoverflow.com/questions/49353699/getting-static-function-call-graph-of-a-cobol-program-in-java and Hello world
example using the above dependency workaround.
On the left you see that I have include logbook
and junit
dependency as well but I still get the above warning: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
.
The issue seems to be pointing that the ANTLR4 library is not available to be referenced.
I have added
Proleap-cobol-parser.4.0.0.jar
as "Referenced libraries" to the Java project (not Maven project). It was created after successfully building the proleap-cobol-parser repo locally. I think I need to addProleap-cobol-parser-sources.jar
as "Referenced libraries" as well but when I add it in Visual Studio Code, it's not getting added.Is this a common issue and any workaround to it?