1

I have been writing a project in Java that I've called NHL2 and at this point in the development I've decided to try to incorporate wheels which can be found here. I've downloaded and unzipped the folder, and tried to import the files in several different ways. In Eclipse I've tried right-clicking the NHL2 project and importing it. The files get inserted into certain places in the project but when I type import wheels.etc.* for instance, it gives me an error and says it cannot resolve the import. So I tried deleting the imported files, right-clicking the package containing my files, which is also NHL2, and running the import command through there. Again, same basic problem.

I've also tried just creating a whole separate project titled wheels and importing there. This seems to be fine and the wheels project itself has no errors, but still I cannot import those files in my NHL2 project. I've tried looking up YouTube videos and other stackoverflow questions because this seems like it's just so basic that it should have been answered by now, but I can't find it.

3
  • include it as an external library to the project Commented Jun 1, 2016 at 6:59
  • Are you downloading source files or a JAR? If you are trying to use source files, then you must place the wheel folder inside your src folder for the imports to work like that Commented Jun 1, 2016 at 7:01
  • @cricket_007 source files. Commented Jun 1, 2016 at 7:01

1 Answer 1

2
  • Create a new Folder in your Project, e.g. called "lib"
  • Copy the wheels.zip into that Folder
  • Open the properties of your Project (Alt-Enter on the Project)
  • Select "Java Build Path"
  • Select the Register Card "Libraries"
  • Click "Add JARs"
  • Select "Yourproject/lib/wheels.zip"
  • Click "OK" then again "OK"

Though it is no jar file (but a zip) it works. I tested it. This is because the zip contains the class files and the source files as well.

Sign up to request clarification or add additional context in comments.

1 Comment

That worked like a damn dream. I don't get it, but I very much appreciate your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.