GWT

 

   
Jason Essington  
查看个人资料   Translate to 中文(简体) Translated (View Original)
 更多选项 2006年10月4日, 上午5时37分
发件人: Jason Essington <jason.essing...@gmail.com>
日期: Tue, 3 Oct 2006 15:37:10 -0600
当地时间: 2006年10月4日(星期三) 上午5时37分
主题: Re: import java.text cannot be resolved to a type
GWT converts java code to javascript, but it only understands a small  
subset of java. If you use something that GWT doesn't understand, you  
will see a message like the one you are seeing.

In your client code, you can only use java classes that gwt supports:
        http://code.google.com/webtoolkit/documentation/jre.html
nothing from java.text is supported

To perform date formatting you would have to use a different method.  
There is a class that performs some very simplistic date formatting  
(org.gwtwidgets.client.util.SimpleDateFormat) in Rob Hanson's gwt-
widget library
        http://gwt-widget.sourceforge.net/

-jason

On Oct 3, 2006, at 3:12 PM, adrian carr wrote:

> Anyone ever see this message in the development shell?
> "import java.text cannot be resolved to a type"

> It barfs on this line (right after my gwt import statements):
> import java.text.SimpleDateFormat;

> Any help is appreciated. It compiles fine in Eclipse, no errors  
> until I
> try to run.

> Thanks,
> Adrian

 

你可能感兴趣的:(JavaScript,java,eclipse,gwt,Gmail)