eclipse编写好Java程序问题

来源:百度知道 编辑:UC知道 时间:2024/06/19 01:15:24
我按debug
在console中输出的是:
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

在eclipse中编写完程序后.
并不是按DEBUG查看结果

编写完程序后
点击右键
RUN AS...选择第一个.
注意.你的程序要写MAIN方法.
并且有结果的显示.

lz要运行程序?run as->java application
Java程序不需要通过编译就可以运行,debug是调试程序的,如果没有设置断点,程序会全部运行一遍!

如果没猜错的话,这个程序是测试环境的。
这个显示的和在cmd下输入java一样!!

没有安装java虚拟机

请输参数