In my system(Ubuntu 10.04) java is running fine but I am not able to run javap command
I have complile Foo
class and .class file path is locate at
/home/mahesh/java/opt
when I execute
javap -c Foo.class
I get following error message :
ERROR:Could not find Foo.class
Is there any need to set any environment variable or any thing else to resolve it.
my $PATH variable is target to:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/bin/
Thank you.
The javap command disassembles one or more class files. Its output depends on the options used. If no options are used, javap prints out the package, protected, and public fields and methods of the classes passed to it. javap prints its output to stdout.
A simple way to see what String literals are used in a ". class" file is to use the javap utility in your JDK installation to dump the file using the "-v" option. Then grep for text that looks like <String "..."> where ... is the String you are looking for.
The javap tool is used to get the information of any class or interface. The javap command (also known as the Java Disassembler) disassembles one or more class files. Its output depends on the options used (“-c” or “-verbose” for byte code and byte code along with innards info, respectively).
You just need to remove the .class
extension.
Use the following command: javap -c Foo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With