Reputation: 56912
I just downloaded GWT 2.5.1 SDK. I ran:
./webAppCreator -out /home/myUser/tmp/dummygwt/ com.dummygwt.OhHai
And it created a GWT project for me. I then navigated to /home/myUser/tmp/dummygwt/
and ran:
ant -buildfile build.xml devmode
And launched the GWT Development Mode tool and I clicked Launch Default Browser
which brought my "OhHai" app up in Firefox.
I then navigated to /home/myUser/tmp/dummygwt/src/com/dummygwt/server/GreetingServiceImpl.java
and opened it for editing. I changed the return value on the GreetingServiceImpl#greetServer
method to start with "Bonjourno," instead of "Hello,". This way, when you enter your name and click the "Send" button, the popup dialog will read "Bonjourno, ...". (I'm just playing around and having fun with this.)
I saved my changes to GreetingServiceImpl.java
and then (inside GWT Dev Mode tool), navigated to the Jetty tab and clicked Restart Server
and got the following warnings:
00:14:25.446 [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
00:14:25.446 [WARN] Adding classpath entry 'file:/home/myUser/sandbox/dsi/workbench/gwt-sdk/gwt-2.5.1/gwt-dev.jar' to the web app classpath for this session More info: file:/home/myUser/sandbox/dsi/workbench/gwt-sdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
I refreshed my browser, entered in a new name and clicked "Send". I'm still seeing "Hello, ..." instead of "Bonjourno, ...". Am I doing something wrong, or is this a bug with the GWT Dev Mode tool? Thanks in advance!
Note: If I exit the Dev Mode tool (and close the tab on my browser), and then relaunch Dev Mode, the server-side changes do take affect. But the GWT documentation clearly states that to "hot deploy" server-side code, all you need to do is restart the server from the tool...not exit it and restart the tool altogether...
Upvotes: 2
Views: 1292
Reputation: 321
the name is simple calls cache and for apply settigs you need to reload it. there are many way to reload, you just have to pickup the one witch is easier for you. close/open is one, you can also clean from your web browser without exiting.
Upvotes: 0
Reputation: 9741
When you run GWT DevMode, it will monitor only changes in client java classes.
Modify any class in any client namespace (src/com/dummygwt/client or src/com/dummygwt/shared), reload the page in the browser, and you will see the changes.
Nevertheless, when you change server side classes, you have to compile them before reloading the jetty server.
Modify a class in server side (ie GreetingServiceImpl.java) using any text editor, then run ant javac
in another terminal and GreetingServiceImpl.class will be updated, finally push on the 'Restart server' button and you will see the changes.
This process is much simpler if you edit your class within Eclipse, because by default Eclipse is configured to continuously compile .java files to .class, so reloading the server is enough.
Upvotes: 3
Reputation: 13690
I'm pretty sure you just need to re-compile GreetingServiceImpl.java after you've made your changes (you do not mention doing it after making changes). Restarting the server will not re-compile everything magically for you (but usually your IDE will).
Notice that hot-deploy is not the same as "hot-compile-deploy".
Upvotes: 4