菜鸟求救,大侠救救我啊,开门不顺

水母在发光 2003-10-10 05:15:54
java配置成功
javac HelloWorld.java
显示:
error: cannot read: HelloWorld.java
1 error

是什么意思,helloworld.java在jdk的目录下,就是不能编译

HelloWorld.java的源程序代码如下:
public class HelloWorld
{
public static void main(String args[])
{
system.out println("HelloWorld");
}
}
谢谢了
...全文
30 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
水母在发光 2003-10-11
  • 打赏
  • 举报
回复
好了,问题解决了,谢谢各位了

我是个java新手,以后希望各位哥哥姐姐多多帮忙,谢谢,^_^
wawaxp 2003-10-10
  • 打赏
  • 举报
回复
system.out println("HelloWorld");
=>System.out.println("HelloWorld")
wawaxp 2003-10-10
  • 打赏
  • 举报
回复

大小写的问题,
注意啦,
leeak 2003-10-10
  • 打赏
  • 举报
回复
是不是 环境变量 没有配置对阿
caoyawu 2003-10-10
  • 打赏
  • 举报
回复
System.out.println("HelloWorld");
要大写s
dinosaur_cl 2003-10-10
  • 打赏
  • 举报
回复
System.out.println("HelloWorld");
yangFrame 2003-10-10
  • 打赏
  • 举报
回复
徐明杰
yangFrame 2003-10-10
  • 打赏
  • 举报
回复
out后面应该有个.
水母在发光 2003-10-10
  • 打赏
  • 举报
回复
如果在C:\jdk1.3.1_09\bin>下执行javac HelloWorld.java就会出现这样的错误,唉,怎么会这样呢

C:\jdk1.3.1_09\bin>javac HelloWorld.java
HelloWorld.java:5: ';' expected
system.out println("HelloWorld");
^
HelloWorld.java:5: cannot resolve symbol
symbol : class out
location: package system
system.out println("HelloWorld");
^
2 errors
水母在发光 2003-10-10
  • 打赏
  • 举报
回复
看,有吧,我就知道不是这个毛病

C:\jdk1.3.1_09\bin>dir
驱动器 C 中的卷没有标签。
卷的序列号是 0E49-11DF

C:\jdk1.3.1_09\bin 的目录

2003-10-08 08:53 <DIR> .
2003-10-08 08:53 <DIR> ..
2003-08-04 15:53 360 HtmlConverter.bat
2003-08-04 15:53 20,600 appletviewer.exe
2003-08-04 15:53 24,678 dt_shmem.dll
2003-08-04 15:53 20,584 dt_socket.dll
2003-08-04 15:53 20,598 extcheck.exe
2003-08-04 15:53 20,600 idlj.exe
2003-08-04 15:53 20,581 jar.exe
2003-08-04 15:53 20,602 jarsigner.exe
2003-08-04 15:53 20,574 java.exe
2003-08-04 15:53 20,595 javac.exe
2003-08-04 15:53 20,595 javadoc.exe
2003-08-04 15:53 20,595 javah.exe
2003-08-04 15:53 20,591 javap.exe
2003-08-04 15:53 20,576 javaw.exe
2003-08-04 15:53 20,604 jdb.exe
2003-08-04 15:53 94,302 jdwp.dll
2003-08-04 15:53 20,598 keytool.exe
2003-08-04 15:53 20,612 native2ascii.exe
2003-08-04 15:53 20,580 oldjava.exe
2003-08-04 15:53 20,597 oldjavac.exe
2003-08-04 15:53 20,582 oldjavaw.exe
2003-08-04 15:53 20,596 oldjdb.exe
2003-08-04 15:53 20,604 policytool.exe
2003-08-04 15:53 20,586 rmic.exe
2003-08-04 15:53 20,592 rmid.exe
2003-08-04 15:53 20,604 rmiregistry.exe
2003-08-04 15:53 20,603 serialver.exe
2003-08-04 15:53 20,619 tnameserv.exe
2003-08-04 15:53 20,590 unregbean.exe
2003-10-08 09:23 110 HelloWorld.java
30 个文件 654,908 字节
2 个目录 7,100,579,840 可用字节
regnay 2003-10-10
  • 打赏
  • 举报
回复
楼上说的对,如果当前目录下没有java文件,报的错误和你的一样,你再看看。祝你好运。
yangFrame 2003-10-10
  • 打赏
  • 举报
回复
我还是坚持我的看法
你在c:\jdk1.3.1_09\bin下
执行dir
看看有没有HelloWorld.java
水母在发光 2003-10-10
  • 打赏
  • 举报
回复
我就是这样做的啊,对了,HelloWorld.java在c:\jdk1.3.1_09\bin目录下,javac这些命令也在这个目录下,没问题吧
键入javac显示
C:\>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O Optimize; may hinder debugging or enlarge class file

-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are us
ed
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version
应该算配置成功吧

可是怎么不能编译呢??????????????????????????
yangFrame 2003-10-10
  • 打赏
  • 举报
回复
你文件名肯定是HelloWorld.java.txt
让你的windows显示扩展名,再改名字

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧