开发者

How to link classes to project in eclipse

I just extracted some classes from a jar file using a program JD GUI. Everything is great when i open the classes manually in eclipse but i would like the classes already in the project to open declarations of the classes i开发者_JAVA百科 extracted. For now i get 'Source not found' as project is linked to the jar file.


You have a few options. For the first two, your sources will need to be in a ZIP or JAR file. I believe JD GUI has an option to export all sources to a ZIP.

  1. When you try to open a class that doesn't have a source attachment, there should be an 'Attach Source...' button that you can click on and attach the source.

  2. You can find the jar you want to attach sources to in the Project/Package explorer, right-click on it, and select 'Properties'. That will bring up a property dialog - select the 'Java Source Attachment' on the left-hand menu and then attach the source there.

  3. Perhaps the easiest - since you are using sources generated by JD GUI, why not just use the Eclipse plugin from the same author? I've used it, and it works quite well: http://java.decompiler.free.fr/?q=jdeclipse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜