how to import correctly the commons.apache.math libraries for my own project

前端 未结 3 2090
慢半拍i
慢半拍i 2021-02-14 14:00

I want to use the commons.apache.maths classes for my own project but I don\'t know how to correctly import them into eclipse. I have visited the download page for the package m

相关标签:
3条回答
  • 2021-02-14 14:49

    download the jar file, extract it locally. Open eclipse, project-property-java build path-libraries-add library, where you add the extracted folder there. then you can use the import org.apache.commons.math3.

    0 讨论(0)
  • 2021-02-14 15:00

    You need to import this way.

    import org.apache.commons.math
    

    You can add the zip file in your build path or extract the jar files from the zip and add it to the build path. For example to add 2.1 of apache math you need this zip file commons-math-2.1.zip or extract commons-math-2.1.jar from the zip file and add it to your eclipse build path.

    Another trick is - if you have the jar files or zip file added in your build path in eclipse then do ctrl+shift+o and eclipse will automatically import the packages for you.

    0 讨论(0)
  • 2021-02-14 15:05

    There is commons-math-2.1.jar in the zip - add this to your project

    0 讨论(0)
提交回复
热议问题