简体   繁体   中英

Including framework in java - IntelliJ

this might be a quite easy question, but I'm really getting crazy, becausse I don't get what I want working. I try so simply include a framework in my project, but I have no idea how... I'm using IntelliJ IDEA and I'm working on a little game and I want to include JGAP in it. I therefore downloaded the zip file and extracted it to my folder, where the rest of the project is as well, so I now have the folder structure with the bin-files, the src-files (and of course some project files). In the src-folder, i put the folder, that contains the unzipped content of JGAP. Now how am I able to include that correctly? Do I have to tell that to the IDE? Or do I have to write this in the code? import org.jpag.* does not seem to work.

With IntelliJ, you can add external dependencies ( jgap.jar in your case) with following procedure:

  • File -> Project Structure
  • Find Libraries tab, on the left
  • Find '+' green button on the top of the window
  • You just have to locate you archive containing your lib ( jgap.jar )

That's it: import org.jpag.* should work now :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM