Using J2SE classes inside GWT client module
Posted: Dec 9, 2010 7:32 AM
                        Reply

Hello ,

I am developing little web application using GWT 2.1 in my Application
class where i override onModuleLoad() have the following code:

public void onModuleLoad() {
Button b = new Button("Click");
b.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
try {
Thread.currentThread().sleep(5000);
Window.alert("After 5 seconds");
} catch (Exception ex) {
Window.alert(ex.getMessage());
}

}
});

RootPanel.get().add(b);
}

but when i compile the code using maven it gets following error:


[INFO] Compiling module david.chokhonelidze.gxt.status.Application
[INFO] Validating newly compiled units
[INFO] [ERROR] Errors in 'file:/D:/java/Maven/GWT/workspace/gxt-status/
src/main/java/david/chokhonelidze/gxt/status/client/Application.java'
[INFO] [ERROR] Line 16: No source code is available for type
java.lang.Thread; did you forget to inherit a required module?
[INFO] Finding entry point classes
[INFO] [ERROR] Unable to find type
'david.chokhonelidze.gxt.status.client.Application'
[INFO] [ERROR] Hint: Previous compiler errors may have made this type
unavailable
[INFO] [ERROR] Hint: Check the inheritance chain from your module; it
may not be inheriting a required module or a module may not be adding
its source path entries properly
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE



did i miss anything? here is my Application.gw.xml file

<module>
<inherits name="com.google.gwt.user.User" />

<entry-point
class="david.chokhonelidze.gxt.status.client.Application" />

</module>


is it really possible to use J2SE classes in client module ,if yes
please tell how?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to