How to import a jar in Eclipse

前端 未结 10 1419
挽巷
挽巷 2020-11-21 06:54

How do I import a jar in Eclipse?

10条回答
  •  一生所求
    2020-11-21 07:28

    Adding external Jar is not smart in case you want to change the project location in filesystem.

    The best way is to add the jar to build path so your project will compile if exported:

    1. Create a folder called lib in your project folder.

    2. copy to this folder all the jar files you need.

    3. Refresh your project in eclipse.

    4. Select all the jar files, then right click on one of them and select Build Path -> Add to Build Path

提交回复
热议问题