当前位置: 技术问答>java相关
(已搜贴)用JCreator调试第一个java程序出错:javac: invalid flag: G:\JavaTest\Welcome1.Java???
来源: 互联网 发布时间:2015-05-05
本文导语: //Fig. 2-1: Welcome1.java //A first program in Java public class Welcome1{ public static void main(String args[]) { // System.out.print( "" ); System.out.println( "Welcome to Java Programming!" ); } } 在JCreator中只打开Welcome1.java,或者把Welcome1.j...
//Fig. 2-1: Welcome1.java
//A first program in Java
public class Welcome1{
public static void main(String args[])
{
// System.out.print( "" );
System.out.println( "Welcome to Java Programming!" );
}
}
在JCreator中只打开Welcome1.java,或者把Welcome1.java添入Workspace.调试都会出现:
--------------------Configuration: j2sdk140 --------------------
javac: invalid flag: G:JavaTestWelcome1.Java
Usage: javac
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 used
-classpath Specify where to find user class files
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-d Specify where to place generated class files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release
-target Generate class files for specific VM version
-help Print a synopsis of standard options
Process completed.
Configure->Options->JDK profiles->J2sdk140->Edit->d:j2sdk140livtools.jar,dt.jar...等
我把Configure->Options->JDK Tools->Compiler->->Edit->Command和Parameters的选项都选上了,也还是出现如上的Error!!!!
各位老大??我该如何配置呢?
//A first program in Java
public class Welcome1{
public static void main(String args[])
{
// System.out.print( "" );
System.out.println( "Welcome to Java Programming!" );
}
}
在JCreator中只打开Welcome1.java,或者把Welcome1.java添入Workspace.调试都会出现:
--------------------Configuration: j2sdk140 --------------------
javac: invalid flag: G:JavaTestWelcome1.Java
Usage: javac
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 used
-classpath Specify where to find user class files
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-d Specify where to place generated class files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release
-target Generate class files for specific VM version
-help Print a synopsis of standard options
Process completed.
Configure->Options->JDK profiles->J2sdk140->Edit->d:j2sdk140livtools.jar,dt.jar...等
我把Configure->Options->JDK Tools->Compiler->->Edit->Command和Parameters的选项都选上了,也还是出现如上的Error!!!!
各位老大??我该如何配置呢?
|
有没有改动过project->project settings里的内容?
|
设置错了,我的就可以用的!!!!!!