【发布时间】:2012-09-11 13:55:52
【问题描述】:
我已经在 eclipse 中有一个 java 项目,我需要在我的 GWT 项目的 server 代码中使用那里的类,也在 eclipse 中。我有一个包,我们称它为com.example,里面有很多子包。
我按照这里的说明进行操作: Eclipse 3.4 GWT 1.6 project - how to reference source from other projects?通过在根包中定义如下文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='example'>
<inherits name='com.google.gwt.user.User' />
<source path="*" />
</module>
在 GWT XML 文件中,我添加了
<inherits name="com.example" />
但我不断得到
java.lang.NoClassDefFoundError
对于com.example中定义的类
知道我做错了什么吗?
【问题讨论】: