简体   繁体   English

如何在Eclipse中查看Java外部Jars公共功能/方法

[英]How to see java external jars public functions/methods in eclipse

How can i see all the public functions that are in external jars with eclipse? 如何查看带有eclipse的外部jar中的所有公共函数? I have a bukkit(a minecraft server) jar. 我有一个bukkit(我的世界服务器)罐子。 I know there are bunch of functions, but i only know one. 我知道有很多功能,但是我只知道一个。 How can i find out all the others? 我如何找出所有其他人?

(
Incase you didnt follow me. 万一你没有跟着我。 I am looking for other lines like this: 我正在寻找这样的其他行:

public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)

)

Add that jar in your build path for the project. 在您的项目的构建路径中添加该jar。 Now from the project explorer explore the referenced libs, this will give you the view of all the classes inside that jar along with their private/public members and methods. 现在,从项目浏览器中探索引用的库,这将为您提供jar中所有类及其私有/公共成员和方法的视图。

If you want to dig it little bit more then you can use jd-gui from following url. 如果您想进一步挖掘它,则可以从以下网址使用jd-gui。 http://jd.benow.ca/ http://jd.benow.ca/

This will allow you to decompile and will show you the full code of the jar. 这将允许您反编译并向您显示jar的完整代码。

mark it as answer if it helps you. 如果有帮助,请将其标记为答案。

Thanks, 谢谢,
Gaurav 高拉夫

The easiest is probably to use the javadoc. 最简单的方法可能是使用javadoc。

I believe you can find the bukkit javadoc here: (I just googled it) 我相信您可以在这里找到bukkit javadoc :(我用Google搜索过)

http://jd.bukkit.org/rb/apidocs/ http://jd.bukkit.org/rb/apidocs/

You can also attach source/javadoc in Eclipse and open them in Content Assist (CRTL+space) or in the editor. 您也可以在Eclipse中附加源代码/ javadoc,然后在Content Assist(CRTL + space)或编辑器中打开它们。 Even without adding the source/javadoc you can view all available members if you press CTRL+space after the dot. 即使不添加源代码/ javadoc,也可以在点后按CTRL +空格键来查看所有可用成员。

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

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