Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
javascript异常NoClassDefFoundError:RegistryFactory的ASTparser_Java_Javascript_Eclipse - Fatal编程技术网

javascript异常NoClassDefFoundError:RegistryFactory的ASTparser

javascript异常NoClassDefFoundError:RegistryFactory的ASTparser,java,javascript,eclipse,Java,Javascript,Eclipse,我正在尝试使用ASTparser来解析javascript。当我运行代码时: ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(source.toString().toCharArray()); parser.setKind(ASTParser.K_COMPILATION_UNIT); 我得到这个错误: Exception in thread "main" java.lang.NoClassDefFoundE

我正在尝试使用ASTparser来解析javascript。当我运行代码时:

ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setSource(source.toString().toCharArray());

parser.setKind(ASTParser.K_COMPILATION_UNIT);
我得到这个错误:

Exception in thread "main" java.lang.NoClassDefFoundError:       org/eclipse/core/runtime/RegistryFactory
    at org.eclipse.core.internal.runtime.InternalPlatform.getRegistry(InternalPlatform.java:556)
    at org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:919)
    at org.eclipse.wst.jsdt.core.infer.InferrenceManager.loadInferenceExtensions(InferrenceManager.java:155)
    at org.eclipse.wst.jsdt.core.infer.InferrenceManager.getInferenceProviders(InferrenceManager.java:63)
    at org.eclipse.wst.jsdt.core.infer.InferrenceManager.getInferenceEngines(InferrenceManager.java:103)
    at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.initializeInferenceEngine(Parser.java:6048)
    at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6014)
    at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5988)
    at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.dietParse(Parser.java:4593)
    at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.parse(JavaScriptUnitResolver.java:406)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:880)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)

我将
org.eclipse.core.runtime
添加到项目中,但它没有修复错误。

我修复了问题:只需将
org.eclipse.equinox.registry
jar文件添加到项目中