---
title: "关于GWT的编译问题"
author: "dcriori"
date: "2009-10-20T11:56:11Z"
tags: []
slug: "gwt"
draft: false
lastmod: "2009-10-20T11:56:11Z"
id: 495946
url: "https://dcriori.iteye.com/blog/495946"
---

今天尝试GWT的RemoteService访问Struts2，使用了struts2gwt-plugin，建立了两个接口，用来访问Struts的Action。

         

```
public interface MyService extends RemoteService {
	public String hello(String s);
}
```

 

和

  

```
public interface MyServiceAsync {
	@SuppressWarnings("unchecked")
	public void hello(String s, AsyncCallback callback);
}
```

 

一开始我把他们建在了client包以外的地方，java的编译器可以通过，但GWT的生成编译器确不能通过，找了一个小时![](/images/smiles/icon_confused.gif)才明白，所有的客户端的东西，必须都放在client包下面，不然编译的时候，就会报继承的东西找不到之类的错误。晕死！