在 NetBeans 中编写程序时如何使用 .jar 文件中的代码
我正在尝试在类项目中使用 jAudioPackage 。我需要它的功能,从 MP3 文件的标头获取 id3 标签信息。我查看了该网站,一旦完成所有设置,它似乎就很容易使用。我只是在实际导入包含代码的 .jar 文件时遇到问题。我该如何在 NetBeans 中解决这个问题?
总而言之,我有 .jar 文件,我只是不知道如何使用文件中的代码。
I am trying to use the jAudioPackage in a class project. I need it's functionality of getting the id3 tag info from the header of a MP3 file. I looked at the website and once you have everything set-up it seems pretty easy to use. I am just having trouble with actually importing the .jar file which contains the code. How would I go about this in NetBeans?
To summarize, I have the .jar file I just dont know how to get to use the code within the file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
右键单击您的项目并转到
Properties ->图书馆 ->添加 JAR/Folder
并在以下对话框中选择 jar 文件。然后在编码/编译时应该可以访问它。Right click on your project and go to
Properties -> Libraries -> Add JAR/Folder
and select the jar file in the following dialog. It should then have access to it when coding/compiling.您需要将 jar 文件添加到项目的库中。阅读 http://netbeans.org/kb/docs/java/ project-setup.html#projects-classpath。
You need to add the jar file in your project's libraries. Read http://netbeans.org/kb/docs/java/project-setup.html#projects-classpath.
请阅读库的文档以了解调用的内容,然后调用所需的方法以完成您正在做的事情。在此之前,您必须将 jar 导入到您的项目中......
Please read the documentation for the library as to what the calls are and then call the required methods in order to accomplish what you are doing. Before you do that you will have to import the jar in to your project...