Java:javap 错误:找不到 .class

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13356811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 12:24:46  来源:igfitidea点击:

Java : javap ERROR:Could not find .class

javajavap

提问by mcacorner

In my system(Ubuntu 10.04) java is running fine but I am not able to run javapcommand
I have complile Fooclass and .classfile 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.

在我的系统(Ubuntu 10.04)中,java 运行良好,但我无法运行javap命令
我有编译Foo类和.class文件路径位于
/home/mahesh/java/opt
当我执行
javap -c Foo.class
I收到以下错误消息:
错误:找不到 Foo.class
是否需要设置任何环境变量或其他任何东西来解决它。我的 $PATH 变量的目标是:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/斌/
谢谢。

回答by mkhelif

You just need to remove the .classextension.

您只需要删除.class扩展名。

Use the following command: javap -c Foo

使用以下命令: javap -c Foo