eclipse无法编译

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了eclipse无法编译相关的知识,希望对你有一定的参考价值。

package uu;

public class Aa

/**
* @param args
*/
public static void main(String[] args)
// TODO Auto-generated method stub
System.out.print("1111");




都无法编译,输出是
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

我把你的代码复制过来 可以运行 说明代码是没问题的 可能是你的eclipse出了问题 建议你咨询下懂行的人 我对工具是不太了解的
英文也看不懂大概意思
参考技术A 很少碰到这种问题,可能是改过JRE了吧,如果没什么重要的工程,直接重装一个就行了.要先配好path和classpath.解压一个eclipse要快多了.只要能解压,就能运行你那段程序了. 参考技术B 安装jdk了没?

Eclipse中NDK无法编译(哪怕是一个新建的空白项目)

23:53:01 **** Incremental Build of configuration Default for project HelloWorld **** "E:\\NDK\\ndk-build.cmd" all Cannot run program "E:\NDK\ndk-build.cmd": Launching failed Error: Program "E:\NDK\ndk-build.cmd" not found in PATH

参考技术A 首先eclipse能运行.cmd文件吗?cmd不是windows命令行吗,能直接在系统运行。另外错误报的信息是没有在classpath找到这个文件,一是你的ndk-build.cmd文件在E:\\NDK目录下不存在,二有可能是eclipse
java
compiler不支持编译.cmd文件,然后在classpath下找不到生成的.class文件,同样会报错。因为看不到你的project,所以只能根据猜测第二种情况要大一些。

以上是关于eclipse无法编译的主要内容,如果未能解决你的问题,请参考以下文章

Eclipse中NDK无法编译(哪怕是一个新建的空白项目)

Eclipse - 安装了jd-eclipse插件后依然无法反编译类文件

Eclipse build时间太长,无法忍受,完美解决方案,Eclipse 编译太卡,耗时太长

Eclipse 无法编译,提示“错误: 找不到或无法加载主类”

Eclipse 无法编译,提示“错误: 找不到或无法加载主类”

为啥在eclipse中这个程序无法编译通过?