简体   繁体   English

尝试使用javap.exe反编译java .class文件

[英]Trying to decompile a java .class file with javap.exe

I have some .class files that I want to decompile. 我有一些我想要反编译的.class文件。 So this is what I do: javap -c "C:\\users\\Richard\\workspace\\pruebas\\bin\\ClassName" and all the time I have the same error ERROR:Could not find C:\\users\\Richard\\workspace\\pruebas\\bin\\ClassName 所以我这样做: javap -c "C:\\users\\Richard\\workspace\\pruebas\\bin\\ClassName"并且我一直有同样的错误ERROR:Could not find C:\\users\\Richard\\workspace\\pruebas\\bin\\ClassName

However, if I list the files contained in such directory using the dir command I can see it listed. 但是,如果我使用dir命令列出此目录中包含的文件,我可以看到它已列出。

Do you guys have any idea of what might be the cause? 你们有什么可能的原因吗? I did man javap and as far as I know the syntax is correct. 我做了man javap,据我所知,语法是正确的。

Any idea is greatly appreciated. 任何想法都非常感谢。

javap looks for classes in the classpath. javap在类路径中查找类。 So, assuming that your ClassName is in the default package, invoke like this: 因此,假设您的ClassName在默认包中,请调用如下:

javap -c -classpath "C:\users\Richard\workspace\pruebas\bin" ClassName

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

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