1

I added some external libraries to my project and in the editor intelliJ is not giving me any errors, when I compile it though it gives me errors saying:

[ERROR] /C:/Users/martijn2/IdeaProjects/fakePing/src/main/java/mpolder/fakePlayer.java:[3,26] package com.skionz.pingapi does not exist

[ERROR] /C:/Users/martijn2/IdeaProjects/fakePing/src/main/java/mpolder/fakePlayer.java:[4,26] package com.skionz.pingapi does not exist

[ERROR] /C:/Users/martijn2/IdeaProjects/fakePing/src/main/java/mpolder/fakePlayer.java:[5,26] package com.skionz.pingapi does not exist

How do I import API's into my intelliJ and make them package with all my other stuff? I use IntelliJ + Maven

Community
  • 1
  • 1
martijn p
  • 598
  • 4
  • 19
  • Sounds to me like the problem is that you have, in fact, already brought the packages into IntelliJ; what you need to do is add them to the Maven POM. But this post is awfully short on details so it's hard to be sure. – dcsohl Jul 31 '15 at 17:47
  • How do i add it to the pom? Thats probably it... – martijn p Jul 31 '15 at 17:57
  • That would entail adding a `` to the `` block. If you don't know how to do this, I would recommend you read through the [Maven Getting Started Guide](https://maven.apache.org/guides/getting-started/index.html) (skip down to "How do I use external dependencies"), as going into the details here is a bit above the scope of an SO comment or even answer. – dcsohl Jul 31 '15 at 18:38
  • Why (and How) to add the in the pom? I think that the question talks about an external library to be added directly through File -> Project Structure... option. Exact same behavior here. @martijnp, did you manage to solve it? – ElPiter Sep 29 '20 at 13:48
  • 1
    @ElPiter Yes, what I think was happening was that it was packaging without the dependencies included. I believe I had to configure something like this for it to work: https://stackoverflow.com/questions/1729054/including-dependencies-in-a-jar-with-maven – martijn p Sep 29 '20 at 23:18

0 Answers0