May I add this package to my existing Java project?

问题: I am beginning at Java GUI, so I ask you professional coders to be understading towards to my humble question. So, I have been coding this small Java project. I came acr...

问题:

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

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

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.

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.

Thanks in advance!

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.

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.


回答1:

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.)

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

  • 发表于 2019-02-14 01:02
  • 阅读 ( 192 )
  • 分类:网络文章

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除