这个文件名也要是HelloWorld.java
解决方案 »
- 怎样将现有的flash放入页面
- 查询统计的SQL问题
- struts2上传多个文件,如何知道文件对应的顺序
- hibernate save插入对象后,事务统一提交报错
- 请问各位在用struts时,是怎样写动态树型菜单的?
- =======================一个简单的XML问题,在线...==========================
- 解决问题(50分)
- 请救 java 内存漏露问题??向高手请教
- 求大神指点
- 小白求教
- <transaction-type>Bean</transaction-type>中间写Bean和写<transaction-type>Container</transaction-type>有什么区别啊?
- 请问怎样解决在java中比如9除12得出0.074999999999999这样的结果,是不是java的bug?
D:\>javac HelloWorld.javaD:\>java HelloWorld
HelloWorld!D:\>
D:\>javac HelloWorld.Java
javac: invalid flag: HelloWorld.Java
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
-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
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-help Print a synopsis of standard options
后缀用了.Java
编译通过,但是java HelloWorld时就出错了
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
C:\j2sdk1.4.0是我的J2sdk安装目录
怎么改?
方法如下:
Win2000中:
右键我的电脑--》属性--》高级--》环境环境变量
classpath=.;jdk安装目录\lib
path=jdk安装目录\bin
注意:一定不可忽略“.”。
Win98中:
修改autocexe.bat 就是修改自动批处理文件。
添加:
set classpath=.;jdk安装目录\lib
set path=jdk安装目录\bin;%path%