Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to decompile a java .class file with javap.exe

I have some .class files that I want to decompile. 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

However, if I list the files contained in such directory using the dir command I can see it listed.

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.

Any idea is greatly appreciated.

like image 334
Xar Avatar asked Jan 24 '26 20:01

Xar


1 Answers

javap looks for classes in the classpath. So, assuming that your ClassName is in the default package, invoke like this:

javap -c -classpath "C:\users\Richard\workspace\pruebas\bin" ClassName
like image 105
parsifal Avatar answered Jan 27 '26 00:01

parsifal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!