Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » java.lang.NoSuchFieldError: resources - Eclipse AST parser error
java.lang.NoSuchFieldError: resources - Eclipse AST parser error [message #1306634] Mon, 21 April 2014 04:19
Pradeep Simha is currently offline Pradeep SimhaFriend
Messages: 6
Registered: February 2013
Junior Member
I am trying to use Eclipse's AST parser as a standalone to parse Java source files. This is a small snippet of a code to get the compilation unit:
    public CompilationUnit getCompilationUnit(ASTParser parser) {
		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
		return cu;

If I try to execute this code standalone ie without Eclipse IDE, I am getting below error:

    java.lang.NoSuchFieldError: resources
	at org.eclipse.jdt.core.dom.ASTConverter.convert( [org.eclipse.jdt.core_3.8.2.v20120814-155456.jar:]
	at org.eclipse.jdt.core.dom.ASTConverter.convert( [org.eclipse.jdt.core_3.8.2.v20120814-155456.jar:]
	at org.eclipse.jdt.core.dom.ASTConverter.convert( [org.eclipse.jdt.core_3.8.2.v20120814-155456.jar:]

I am not understanding from where does it's calling method `resources`. If I try to run from Eclipse IDE it works without any issues. I have included following JAR files in the classpath:


I have included all of the necessary jar files to run successfully. But when I run this error occurs. Can anyone please guide me?
Previous Topic:How to show the title of a standalone view?
Next Topic:Automatically attach sources to dependencies
Goto Forum:

Current Time: Mon Jun 18 12:09:06 GMT 2018

Powered by FUDForum. Page generated in 0.01561 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top