Vaadin - GWT error "module xxx may need to be recompiled

前端 未结 6 658
孤城傲影
孤城傲影 2021-01-27 00:27

I\'m ramping up on Vaadin and I\'m getting this javascript alert whenever I try and run the demo apps.

GWT module \'com.vaadin.terminal.gwt.DefaultWidgetSet\' ma         


        
6条回答
  •  走了就别回头了
    2021-01-27 00:36

    I don't know anything about Vaadin, but there's a more general context in which this error occurs:

    So long as you're testing in Eclipse, the dynamic coding of your app is still real Java coding being run in a JVM. This coding is made available through debugger that's accessible via a socket. You get a URL that looks like this:

    http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997

    with this codesvr thing being your eclipse-hosted debugger process for your Java code.

    Before your app can run standalone, GWT has to translate your Java code to JavaScript; separate versions of the code are produced for each browser type (Firefox, WebKit, Opera, ...) and language that you want to support. Only once this is done can you access your app the usual way via

    http://127.0.0.1:8888/MyApp.html

    After weeks of running my app only in Eclipse, I'd managed to forget about the compiling-for-browsers step and wondered about the message. The way to fire up the compiler, if you're not using the Ant task, is to hit Google|GWT Compile in the project's context menu. That done, the JS in your app gets fleshed out and your app can run without Java on the client side.

    And of course the message goes away.

提交回复
热议问题