java.lang.NoClassDefFoundError:com/google/gwt/json/client/JSONParser在运行时尝试解析json

java.lang.NoClassDefFoundError:com/google/gwt/json/client/JSONParser在运行时尝试解析json,java,json,gwt,runtime-error,Java,Json,Gwt,Runtime Error,我正在使用GWT,当我尝试解析json时,在运行时会出现java.lang.NoClassDefFoundError:com/google/GWT/json/client/JSONParser异常 我已导入以下内容: import com.google.gwt.json.client.JSONParser 我的代码是 String r = ((Text) Entity.getProperty("result")).getValue(); JSONValue jsonValue; json

我正在使用GWT,当我尝试解析json时,在运行时会出现
java.lang.NoClassDefFoundError:com/google/GWT/json/client/JSONParser
异常

我已导入以下内容:
import com.google.gwt.json.client.JSONParser

我的代码是

String r = ((Text) Entity.getProperty("result")).getValue();    
JSONValue jsonValue;
jsonValue = JSONParser.parseStrict(r);

一般来说,我会说找不到jar,但在这种情况下,不需要外部jar,对吗?那么这里出了什么问题,我如何修复它呢?

要使用JSON,您需要继承正确的模块(在您的应用程序模块中)


另外,确保类路径中有
gwt user.jar