简体   繁体   English

如何将库添加到Netbeans

[英]How to add libraries to Netbeans

I'm a beginner trying to figure out libraries. 我是一个初学者,试图弄清楚图书馆。 I've read through many previous questions on how to do this, but the answers are not helping me. 我已经阅读了很多有关如何执行此操作的问题,但是答案对我没有帮助。 Here is my current situation: 这是我目前的情况:

import src.main.java.org.reflections.Reflections;

public class HelpMe {

    Reflections reflections = new Reflections("my.project.prefix");
}

Here are my project run-time libraries: 这是我的项目运行时库:

在此处输入图片说明

And here is the reflections package: 这是反射包:

在此处输入图片说明

I am getting these errors: 我收到这些错误:

error: package src.main.java.org.reflections does not exist 错误:包src.main.java.org.reflections不存在

error: cannot find symbol Reflections reflections = new Reflections("my.project.prefix"); 错误:找不到符号Reflections Reflections = new Reflections(“ my.project.prefix”);
symbol: class Reflections 符号:类思考

You need to include the library in your project properties. 您需要在项目属性中包括库。

  • Right Click on you project and choose "Properties" 右键单击您的项目,然后选择“属性”
  • Navigate to Libraries and add it. 导航到库并添加它。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM