I am trying to write a Java program that can run this code from this library https://github.com/pemistahl/lingua
The code is successfully built in Gradle so the environment is all good but when I am trying to run my Java file this is what is says
Exception in thread “main” java.lang.Error: Unresolved compilation problems:
LanguageDetector cannot be resolved to a type
LanguageDetectorBuilder cannot be resolved
Language cannot be resolved to a variable
Language cannot be resolved to a variable
Language cannot be resolved to a variable
Language cannot be resolved to a variable
Language cannot be resolved to a type
at RunLingua.main(runLingua.java:8)
This is the code that is being used
enter image description here
Note: The Java file is outside of the library folder
I have no clue what the issue is because I am new to Java. I’m not sure if it is because the Java file is not under the library folder or if there is something wrong with the code.
Thanks in advance
Leighton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.