GWT/ Eclipse: ClassNotFoundException com/google/gwt/dev/Compiler

前端 未结 8 702
醉话见心
醉话见心 2021-01-05 14:27

i recently updated from GWT 2.0.4 to 2.1.0. Since then I cannot compile my GWT application anymore. When I click on the GWT compile button of the GWT eclipse plugin I get th

相关标签:
8条回答
  • 2021-01-05 15:24

    I was facing a similar issue where I was getting constantly java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler. While searching around I realized that the gwt version was missing a file from inside the gwt-dev folder inside the gwt installation directory.

    Actually, I am using maven and gwt 2.5.0 for my project, and I discovered that inside .m2\repository\com\google\gwt\gwt-dev\2.5.0 folder should exist four files in order for gwt compiler to work. Those are

    • gwt-dev-2.5.0.jar <-sometimes this is corrupted
    • gwt-dev-2.5.0.jar.sha1 <- this one was missing
    • gwt-dev-2.5.0.pom
    • gwt-dev-2.5.0.pom.sha1
    0 讨论(0)
  • 2021-01-05 15:24

    My understanding is:

    When GWT compiles a project, it needs the tool "com.google.gwt.dev.Compiler" (which has a "main" entry point); however, GWT does not use Eclipse project's "build path" setting to find the tool, instead, it looks at OS's "classpath" system variable.

    So, I think the solution is to add "D:\Java\GWT\gwt-2.6.1\*;" (my case as example) into "classpath" and restart Eclipse. It works well for me since.

    0 讨论(0)
提交回复
热议问题