如何安装jar库? [英] How to install jar library?

查看:84
本文介绍了如何安装jar库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了ANTLR Java运行时库。这是一个jar文件。它包含org.antlr.runtime。我在哪里放置它以便Java编译器可以找到它?我需要提取它吗?我正在使用NetBeans(现在),如果相关的话。

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 extract it? I'm using NetBeans (for now), if relevant.

推荐答案

对于NetBeans,您可以转到项目选项卡,然后右键 - 单击要添加库的项目,然后单击属性。转到Libraries bullet,然后在右侧单击Add JAR / Folder。无需提取它。您只需在编辑器窗口中单击鼠标右键,然后单击修复导入。

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.

要在NetBeans之外使用,必须将其添加到Java类路径中。

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

这篇关于如何安装jar库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆