0

I'm having trouble adding a .jar externally, notice that the .jar in the correct location, apparently has been added to the project, is ms-azure-cs-faceapi.jar, I added by clicking on add external JARs.

enter image description here

I'm using this library in a class only, and after adding it to the path the errors are gone, there are no errors in the system, at least red dots are not appearing in any folder, apparently everything is all right.

However, when I run the "clean install" appear these errors in the console:

[ERROR]/I:/system/execs/eclipse/test/src/main/java/TestFaceapi.java:[26,67] package com.microsoft.azure.cognitiveservices.vision.faceapi.models does not exist
[ERROR] /I:/system/execs/eclipse/test/src/main/java/TestFaceapi.java:[190,31] cannot find symbol
[ERROR] symbol:   class FaceAPI
[ERROR] location: class TestFaceapi
[ERROR] /I:/system/execs/eclipse/test/src/main/java/TestFaceapi.java:[239,38] cannot find symbol
[ERROR] symbol:   class FaceAPI
[ERROR] location: class TestFaceapi

As I said, in the class there is no error, everything is ok, but I can not climb the application due to this error ... does anyone have an idea of what might be missing when importing .jar externally?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Ronald Calazans
  • 71
  • 1
  • 11
  • Is it properly imported? Do you have a `module-info.java` file in your source folder? – dan1st May 27 '21 at 21:22
  • Your JRE being 1.5 could only deal with very aged libraries compiled to java 1.5. Also if you use maven (?), better use https://mvnrepository.com/artifact/com.microsoft.azure.cognitiveservices/azure-faceapi/0.0.1-beta – Joop Eggen May 27 '21 at 21:28
  • @JoopEggen I downloaded the dependency by maven, but it continued to give the same problem ... I tried to create another project from 0, with nothing inside, only with the test class, but it continued with the same error: / – Ronald Calazans May 27 '21 at 22:25
  • @dan1st The project is very basic, it has nothing but the test class, I don't know what may be happening, since there is no error anywhere :( – Ronald Calazans May 27 '21 at 22:26
  • With properly imported, I meant whether you have an `import` statement at the top of your source file. – dan1st May 28 '21 at 07:02
  • @dan1st Are you asking if I'm importing the library package in the class I'm using? Yes I'm hehe, everything is fine, I don't know what the mystery of this problem I'm going through ... really, I don't know what else to try :( .... In your first reply you commented on module-info.java, what would this file be? – Ronald Calazans May 28 '21 at 15:01
  • Make sure you remove the manual dependency from Build Path and only use the Maven dependency. Show how you are defining that dependency, and show the build results from that. – David M. Karr May 28 '21 at 15:11
  • module-info.java is a special file that declares a jpms module and specifies deoendencies. If you have such a file in your source folder, you need to specify all modules you depend on in this file. – dan1st May 28 '21 at 17:15
  • @DavidM.Karr - A thousand apologies for my delay to respond, I gave up trying to import this package, went to search another solution to use azure facial recognition and found another simpler API, with it worked :), anyway thanks for the reply. – Ronald Calazans May 31 '21 at 15:37
  • @dan1st In the project had no module, it was very simple, very basic even, but I gave up trying to import this package, Went to search another solution to use facial recognition of azure and found another API simpler, with it worked :), anyway thanks for the response. – Ronald Calazans May 31 '21 at 15:38

0 Answers0