如何在Eclipse中编辑Maven依赖关系中的`.class`文件 [英] how to edit `.class` file in Maven dependency in Eclipse
问题描述
jar
文件夹,其中有一个 .class
文件。现在,我点击下载源
,我可以将 .class
文件查看为Java文件,但是我不能在Eclipse中编辑它。 我该怎么办?
您无法编辑 .class
文件。您只能编辑源代码中包含的 java
文件并重新编译。
下载的源通过 maven
是在给定时间为给定项目的 maven源插件
生成的项目SNAPSHOT,以帮助调查代码,但肯定不会修改代码。
这些源可以绑定到类路径,用于在IDE中导航项目源,但它们仍然是只读的。
Ok, so I have my Java projects, and under the Maven dependency project folder on the project explorer, I encounter a jar
folder, and in it there is a .class
file. Now, I clicked on Download Sources
and I am able to view the .class
file as a Java file, but I cannot edit it in Eclipse.
What should I do?
You cannot edit .class
file(s). You can only edit java
file(s) contained in the source code and recompile.
The sources that are downloaded by maven
are a project SNAPSHOT generated by the maven source plugin
for a given project at a given time, to aid in investigating the code, but certainly not to modify it.
These sources can be bound to the classpath and used for navigating the project source in an IDE, but they still remain read-only.
这篇关于如何在Eclipse中编辑Maven依赖关系中的`.class`文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!