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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值