我可以将此程序包添加到我现有的Java项目中吗? [英] May I add this package to my existing Java project?

查看:142
本文介绍了我可以将此程序包添加到我现有的Java项目中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Java GUI开始,所以我请专业的编码人员对我这个谦虚的问题保持冷静.

I am beginning at Java GUI, so I ask you professional coders to be understading towards to my humble question.

因此,我一直在编写这个小型Java项目.我遇到了一个问题,那就是查询一个Json文件.在网上寻找答案的过程中,我偶然在github上发现了这个项目:

So, I have been coding this small Java project. I came across a problem, which is to query a Json file. During my quest over the internet looking for an answer, I stumbled upon this project on github:

https://github.com/json-path/JsonPath

事实证明是我的问题的解决方案.能够在json文件中搜索特定节点所需的一切都已在这里进行了硬编码.

Which proved to be the solution for my problem. Everything I need to be able to search for specific nodes on a json file is there, hard coded.

我的初学者问题:是否可以在我的现有项目中包含此"JsonPath"? IDE是Apache Netbeans 10.0,项目是Java SE应用程序.

My beginner question: Is that possible to include this 'JsonPath' in my existing project? The IDE is Apache Netbeans 10.0 and the project is a Java SE application.

提前谢谢!

我尝试搜索Services-> Maven存储库->查找...

I tried searching Services->Maven repository->Find...

我碰巧找到了这个包裹,但是我不知道如何添加包裹.另外,我不确定是否可以将其添加到我的项目中.

I happened to find this package but I have no clue how to add the package. Also, I am not sure if its possible to add it to my project.

起初,我认为对我的主类执行类似"com.jayway.jsonpath"的事情可以解决我的问题-但显然没有,这就是为什么我要求你们提供一些指导.

At first I thought doing something like "com.jayway.jsonpath" to my main class would solve my problem - But obvisouly it didn't, that's why I'm asking you guys for some guidance.

推荐答案

您将要使用 Gradle Maven first .这样您就可以在项目中放置所有像这样的第三方依赖项. (注意:如何使用或安装这些工具中的任何一个都不在本问题的范围之内.)

You're going to want to use a dependency management tool like Gradle or Maven first. This gives you a place to put all of the third-party dependencies like this one in your project. (Note: how to use or install either of those tools is outside of the scope of this question.)

然后,您只需要 Maven坐标.幸运的是,项目那些坐标可用.

Then, you just need the Maven coordinates. Luckily the project has those coordinates available.

这篇关于我可以将此程序包添加到我现有的Java项目中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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