GWT で単純な画像を読み込もうとしています。しかし、それは決して見つかりません。
import com.google.gwt.user.client.ui.Image;
public class ImageTest implements EntryPoint {
Image image = new Image("test.png");
}
結果:
[WARN] 404 - GET /test.png (127.0.0.1) 1394 bytes
Request headers
Host: 127.0.0.1:8888
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://127.0.0.1:8888/ImageTest.html?gwt.codesvr=127.0.0.1:9997
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1394
test.png
クラスと同じディレクトリに配置されImageTest
ます。の下にも入れてみましたsrc/main/resources
。同じエラー。
画像はどこに配置する必要がありますか?