How to install jar library?

后端 未结 3 1832
死守一世寂寞
死守一世寂寞 2021-02-13 19:32

I\'ve downloaded the ANTLR Java runtime libraries. It\'s a jar file. It contains \"org.antlr.runtime\". Where do I put it so that the Java compiler can find it? Do I need to ext

相关标签:
3条回答
  • 2021-02-13 20:06

    For java command line you need to add it to your class path however in Netbeans you just need to add it as a library. It can be anywhere. Google to find out how to do these things.

    In fact in netbeans, you can just say you need this in your maven project and it will do the download of the jar and its source/documentation as required.

    0 讨论(0)
  • 2021-02-13 20:07

    Assuming you can find your jdk folder, You can move the .jar file into the jdk\jre\lib\ext folder, where other .jar files are placed. After doing so, NetBeans should be able to run files with access to the library

    0 讨论(0)
  • 2021-02-13 20:24

    For NetBeans you go to your Projects Tab and then right-click on the project you want the library added to then click Properties. Go to the Libraries bullet then on the right side click on Add JAR/Folder. No need to extract it. All you have to do is right click in the editor window and click Fix Imports.

    For use outside of NetBeans you have to add it to your Java classpath.

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