最近购买了一台新电脑,试图继续开发 Java。我使用的 IDE 之一 JCreator 已经开始向我吐出错误。我在新机器上卸载并重新安装了几次 Java 以使一切正常。
我有一个语法正确的程序,编译得很好,但是每当我尝试从 IDE 中运行该程序时,它都会吐出一条错误消息。内容如下:
--------------------Configuration: <Default>--------------------
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-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 | -no-jre-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 with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-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
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Process completed.
我假设这只是有关如何连接运行时环境的说明。
最重要的是,所有运行时设置都在:
配置 > 选项 > JDK 工具 > 运行应用程序
在我的旧机器上完全一样,它运行一切都很好。我知道这一定是 JCreator 的问题,因为我可以从命令行完美地编译所有内容,然后运行它。
javac 和 java 命令在命令行中工作,只是这一件事在 JCreator 中不起作用。
有关解决此问题的最佳方法的任何想法?