Java : javap ERROR:Could not find .class

2019-03-24 15:06发布

问题:

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.

回答1:

You just need to remove the .class extension.

Use the following command: javap -c Foo



标签: java javap