【发布时间】:2014-03-01 17:43:57
【问题描述】:
我正在使用带有 Google App Engine 插件的 Eclipse。我正在尝试运行一个添加了 joda 时间的简单程序。似乎该错误与构建路径有关,我按照以下说明进行操作: https://stackoverflow.com/a/12105417/3255963 但我仍然收到以下错误。接下来我需要做什么?
package test;
import java.io.IOException;
import javax.servlet.http.*;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
@SuppressWarnings("serial")
public class testServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
DateTime newYears = new DateTime (2014, 1, 1, 0, 0);
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");
}
}
错误:
java.lang.NoClassDefFoundError: org/joda/time/DateTime
我在项目资源管理器和构建路径中看到了 joda-time-2.3.jar。
我也尝试在 order 和 export 下选择它。
【问题讨论】:
标签: eclipse jakarta-ee java