How do I find the packages defined in a jar?

前端 未结 5 1237
醉酒成梦
醉酒成梦 2020-12-17 18:05

I have a bunch of JAR files (from a maven2 project) and maven reports some package could not be found (org.openanzo.client.jena to be exact). I want to dig into the JAR file

5条回答
  •  醉酒成梦
    2020-12-17 18:37

    jar tvf filename.jar will show you the contents of a jar file without requiring you to extract it.

    But I think that maybe what you are really trying to do is find the right coordinates for the dependency that you are missing, since obviously none of the ones you have right now are supplying the package you are looking for (in other words, checking their contents is not likely to help you).

    I confess that the first place I would suggest to check is Sonatype's public Nexus instance. A search for your example turns up nothing, though. Usually that means the project is not trying to get their stuff into Maven Central or other major repositories (which is okay), so you have to resort to a web search. Usually the first two sections of the package tell you where to look (openanzo.org in your case).

提交回复
热议问题