关于Eclipse里运行Java程序的问题

首先说明下情况,我的电脑的环境路径设置都是没问题的,EditPlus是可以编译并运行程序的,我的JDK在F盘JAVA文件夹下,我已经检查过Eclipse的首选项设置是没有问题的。另外我的程序编译已经通过了,路径下有class文件了。
然后运行就出现Eclipse里的控制台下列提示

Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image

我已经看过百度上的几个回答,都不满意。希望牛人传授设置的方法
这是图片

第1个回答  2009-09-11
很有可能就是jdk版本的问题,有可能你的Eclipse用的jdk版本和你编译的时候用的不是同一个版本。配置Eclipse使用的jdk方法:windows -> preferences -> java ->Installed JREs 在右边点 add...按钮新增加一个,然后选中你新增加的jdk 就可以了
第2个回答  2009-09-11
建议重新安装Eclipse
然后在window---preferences----java-----installed JREs中点击ADD 增加你的jdk所在位置,并勾选 确定。

希望这样可以解决你的问题。本回答被提问者采纳
第3个回答  2009-09-11
是不是JDK的版本问题呢。可能你装的是jdk6 你程序中要用到新特性,默认情况下Eclipse是版本5的。你设一下编译器。还有并不是说生成了class文件就是编译通过了,Eclipse是边编辑边编译的。只是检查了一些小的语法错误。
第4个回答  2009-09-11
提升izhege错误,说明jdk按扎unghao了,我估计是你的class文件所在的文件夹的名字中有空格造成的
第5个回答  2009-09-13
看看eclipse运行时参数设置有没有问题
相似回答