1

I am relatively new to java as a disclaimer. I see all kinds of code examples where people "import net...." yet anytime that I try to import anything from this directory, I get an error that the compiler cannot resolve the import net. What have these other programmers done that allows them to use this import? I have seen other people having this problem but I have not seen a straight-forward answer to this question.

For instance:

import net.sourceforge.binge.Xbox360Controller;
agiles231
  • 71
  • 5
  • You have to add the libraries to your project . see http://stackoverflow.com/questions/4962559/import-libraries-in-eclipse – vandale Jun 14 '14 at 21:38

1 Answers1

0

When you import an external package, you need to have it in your program during runtime, which means that it either has to exist in YOUR project, or if it is being loaded by another program, then that program has to contain it. To add a library to your eclipse project: see THIS

Community
  • 1
  • 1
Victor2748
  • 4,149
  • 13
  • 52
  • 89