paket khusus dalam toples eksternal GWT (specific packages in a external jar GWT)


問題描述

paket khusus dalam toples eksternal GWT (specific packages in a external jar GWT)

i have a jar file with many packages,  Out of which i need only a few in the Client Side GWT code, but i need this whole jar in my server side.

And as of now this jar doesn't have  an xml file.

this is the jar structure ,

source.package1
source.package2
...

So here if i put a xml file in source folder with

<?xml version="1.0" encoding="utf‑8"?>
<module>
<inherits name='com.google.gwt.user.User'/>
<source path='package1'></source>
<source path='package2'></source>
</module>

for only those packages needed and inherit this in my project xml, will it work?

The reason for not including all the packages is, it is not GWT compatible. But the ones i am including are.

‑‑‑‑‑

參考解法

方法 1:

In general this will work, but you have to have .java file and not .class files for GWT to work on. So including the sources of that your (or just the two packages) is also required.

Since you seem to control the build of the other jar file you might want to build a specific gwt jar file that contains your gwt.xml and the .java files for those two packages.

(by mvairavanDaniel Kurka)

參考文件

  1. specific packages in a external jar GWT (CC BY‑SA 3.0/4.0)

#gwt






相關問題

通過 GWT-RPC 發送持久的 JDO 實例 (Sending persisted JDO instances over GWT-RPC)

GWT:帶有 db 變量的屬性文件的安全位置 (GWT: Safe place for properties file with db variables)

paket khusus dalam toples eksternal GWT (specific packages in a external jar GWT)

在 gwt 框架中使用參數更改 url (Changing url with parameters in gwt framework)

通過 JavaScript 在標題或 HTML 中動態包含腳本元素 (Dynamically include script element in header or HTML by JavaScript)

Java如何在構造函數中將接口作為參數傳遞? (Java How do I pass interface as parameter in Constructor?)

如何更改 gwt 面板的內容? (How to change the content of a gwt panel?)

內容類型是“應用程序/x-www-form-urlencoded”。預期的“文本/x-gwt-rpc” (Content-Type was 'application/x-www-form-urlencoded'. Expected 'text/x-gwt-rpc')

如何從谷歌應用引擎調用我的應用網址 (How to call my app url from google app engine)

GXT NumberField 不可編輯 (GXT NumberField not editable)

在碼頭上部署 gwt Web 應用程序 (deploying gwt web application on jetty)

在 gwt 中使用 html5 畫布畫一個圓圈? (draw a circle using html5 canvas in gwt?)







留言討論