GWT项目不编译,在同一个包不能解决类

GWT项目不编译,在同一个包不能解决类

问题描述:

我们试图运行一个小的web应用程序,只是无法摆脱这两个错误:GWT项目不编译,在同一个包不能解决类

Finding entry point classes 
     Tracing compile failure path for type 'com.test4.project.client.Test4' 
     [ERROR] Errors in 'file:/C:/Users/arik/OneDrive/workspaceHP/Test4/src/com/test4/project/client/Test4.java' 
      [ERROR] com.test4.project.server.ImportHandler cannot be resolved to a type 
     [ERROR] Errors in 'file:/C:/Users/arik/OneDrive/workspaceHP/Test4/src/com/test4/project/server/ImportHandler.java' 
      [ERROR] Line 44: No source code is available for type java.text.SimpleDateFormat; did you forget to inherit a required module? 
[WARN] Server class 'com.google.gwt.dev.shell.jetty.JDBCUnloader' could not be found in the web app, but was found on the system classpath 
    [WARN] Adding classpath entry 'file:/C:/Users/arik/.p2/pool/plugins/com.google.gwt.eclipse.sdkbundle_2.7.0/gwt-2.7.0/gwt-dev.jar' to the web app classpath for this session 
    For additional info see: file:/C:/Users/arik/.p2/pool/plugins/com.google.gwt.eclipse.sdkbundle_2.7.0/gwt-2.7.0/doc/helpInfo/webAppClassPath.html 

这里是链接到我们的混帐回购:https://github.com/braunwiediefarbe/Test4/tree/new_Importer

新的进口商分支是我们正在努力的一个,另外一个只是运行,所以我们有一些东西需要证明......

我使用JDK 1.8和SDK 2.7。我从字面上不知道它会是什么,我们尝试了所有可以在谷歌上找到的东西。

感谢您的帮助! Arik

GWT将客户端代码编译为javascript,这意味着如果它没有Javascript“实现”,则不能在客户端运行任何Java代码。

SimpleDateFormat不能在客户端代码中使用,因为它没有任何编译为Javascript的方式,您可以使用DateTimeFormat进行客户端日期格式设置。