用记事本写好java的源程序以后要怎样编译???
我在记事本里写入了这些内容:publicclassHelloJava{publicstaticvoidmain(Stringarg[]){System.out.print...
我在记事本里写入了这些内容:
public class HelloJava{
public static void main(String arg[]){
System.out.println("HI,java!");
}
}
然后我把记事本的名字(包括后缀)改为HelloJava.java
之后我就不知道要怎样做了。
书里说要在DOC下输入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
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <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
-endorseddirs <dirs> Override location of endorsed standards path
-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
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
可是我的输入javac以后却写着:
'javac'不是内部或外部命令,等等
我要怎么办啊????急急急 展开
public class HelloJava{
public static void main(String arg[]){
System.out.println("HI,java!");
}
}
然后我把记事本的名字(包括后缀)改为HelloJava.java
之后我就不知道要怎样做了。
书里说要在DOC下输入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
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <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
-endorseddirs <dirs> Override location of endorsed standards path
-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
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
可是我的输入javac以后却写着:
'javac'不是内部或外部命令,等等
我要怎么办啊????急急急 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询