2016-11-14 87 views
-3

我們試圖運行一個小的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

回答

1

GWT將客戶端代碼編譯爲javascript,這意味着如果它沒有Javascript「實現」,則不能在客戶端運行任何Java代碼。

SimpleDateFormat不能在客戶端代碼中使用,因爲它沒有任何編譯爲Javascript的方式,您可以使用DateTimeFormat進行客戶端日期格式設置。

相關問題