External static methods not being recognized in the project

Asked

Viewed 21 times

1

I am importing a library of utils into my main project, the library currently contains a single static method, I can import both manually and by Maven, but I am not able to access the static method of the library. I am using Spring boot, Maven and JDK 1.8 in the project the library was created with JDK 1.8.

Class inside the . jar:

import java.util.List;

public class CalculoGeografico {
    public CalculoGeografico() {
    }

public static boolean CalcularPontoDentroPoligono(List<Double> latidudes, List<Double> longitudes, Double pontoLatitude, Double pontoLongitude) {
    boolean result = false;
    int j = latidudes.size() - 1;

    for(int i = 0; i < latidudes.size(); j = i++) {
        if (((Double)latidudes.get(i) < pontoLatitude && (Double)latidudes.get(j) > pontoLatitude || (Double)latidudes.get(j) < pontoLatitude && (Double)latidudes.get(i) > pontoLatitude) && (Double)longitudes.get(i) + (pontoLatitude - (Double)latidudes.get(i)) / ((Double)latidudes.get(j) - (Double)latidudes.get(i)) * ((Double)longitudes.get(j) - (Double)longitudes.get(i)) < pontoLongitude) {
            result = !result;
        }
    }

    return result;
}
}
  • Could you post the pom.xml of your "main" project and the pom.xml of the library in question? In addition, you could also post the method call you are trying to make?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.