Java: How do I know which jar file to use given a class name?

前端 未结 17 1327
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 09:47

Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file to use? I know it\'s in org.eclipse.ui.ide, but how would I fin

17条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 10:00

    Usually, I do jar -vtf foo.jar to get a list of all the class files.
    Not the most practical way, but handy. You can combine the result with grep, of course.

提交回复
热议问题