javac找不到文件
安装了java,并设置好了环境变量,在命令提示符窗口输入C:\>javac后可以运行.建立一个记事本文档,输入class A
{
public void new{
system.out.println("A")
}
}
文档名为A.java放在D:\.然后在命令提示符
C:\>D:
D:\>javac A.java
但他提示我找不到文件?为什么
----------------解决方案--------------------------------------------------------
I had a try
It is no error in using javac command. I execute your commands. It is OK.But there are two erroes in your programme.The one is system, it should be System. The other one is the last ")", it should be ")".
----------------解决方案--------------------------------------------------------
main
主方法好像没有。。。。添加一个主方法 ----------------解决方案--------------------------------------------------------
java源文件的后缀是.java
你的文件可能是A.java.txt吧...
public void new() {
}
----------------解决方案--------------------------------------------------------
你先在 运行中输入javac,看有没有java文件,如果没有,那么你的环境变量就是没有设好,自己上网找下相关设置。
----------------解决方案--------------------------------------------------------
回复 第2楼 baifenghan 的帖子
"Thee one is system,it should be system."What meaning is this?I look forword to your advances.And is there different between ")" and ")"? ----------------解决方案--------------------------------------------------------
回复 第3楼 lbr2008 的帖子
Thank you.But why don't javac still find this file when I transform "new" into "mean"? ----------------解决方案--------------------------------------------------------
回复 第4楼 VaryWater 的帖子
I only transform “新建 文本文档” into "A.java".Wrong?What should I do?Request for your comment. ----------------解决方案--------------------------------------------------------
new是关键字,能这样用的吗?
----------------解决方案--------------------------------------------------------