1305324 九、發明說明: 【發明所屬之技術領域】 本發明係關於爪哇應用轾式’尤其是有關於利用網路飼 服機制,動態置換資源與稃式模組以產生新的爪哇應用程式 的方法。 【先前技術】1305324 IX. Description of the Invention: [Technical Field of the Invention] The present invention relates to a Java application type, in particular, a method for dynamically replacing a resource and a UI module using a web feeding mechanism to generate a new Java application. . [Prior Art]
爪哇程式語言(Java )是美國昇陽公司(Sun Microsystems) 在1995年專門為網際網路設計的一項程式語言。Java的特色 是跨平台、容易使用、直譯以及物件導向。尤其是跨平台技 術,不同的裝置或平台只要具有Java虛擬機器(JavaVirtual Machine)可以讓同一套以Java語言撰寫的軟體編譯成java 位元碼(Java byte code)後’在具有不同作業系統與硬體環 境的裝置或平台上工作。 由於Java的設計出發點就是以網路應用為主、再加上其 跨平台的特性,使得它成為手持行㈣置像是手機或pDA 裡,最受歡迎的顧程式開發n隨著行騎訊的蓬勃 發展’有愈來愈多的手機或PDA’不論其運行的作業系統是 winCE②、p祕⑧、還是其他專屬的作“統,_建有Java 虛擬機器’使得有大㈣活潑的應用程核是遊戲程式被開 發出來。這些應用程式或是遊戲 取程式的Java位元碼,可以隨 時透過網路下載到手持行動_ 譯器(―如)來執行/上’由其_虛擬機器的解 5 1305324 昇陽公司將Java分成了適用於三種環境的版本:定位於 用戶端應用的 J2SETM ( Java™ 2 Platform,Standard Edition)、 疋位於伺服器端應用的 J2EE™ ( Java™ 2 Platform,Enterprise Edition)、以及針對例如手機、PDA等運算效能與處理速度較 慢的小型手持裝置產品所特別開發的J2ME™ ( Java™ 2 Platform,Micro Edition )。如前所述,目前絕大多數的手機、 PDA廠商都内建符合J2ME規格的運算環境,而支援J2ME 的應用或遊戲程式也是數量最多。Java programming language (Java) is a programming language designed specifically for the Internet by Sun Microsystems in 1995. Java features cross-platform, easy to use, literal translation, and object orientation. Especially for cross-platform technology, different devices or platforms only have a Java Virtual Machine that allows the same set of software written in Java to be compiled into Java byte code after having different operating systems and hard Work on a device or platform in a physical environment. Because Java's design is based on web applications, coupled with its cross-platform features, it makes it a handheld device. (4) The image is in the mobile phone or pDA. The most popular program development is with the ride. Flourishing 'there are more and more mobile phones or PDAs' regardless of whether the operating system is winCE2, p secret 8, or other proprietary "systems, _ built Java virtual machines" to make a large (four) lively application core It is the game program that has been developed. These applications or the Java bit code of the game fetch program can be downloaded to the handheld device via the Internet at any time to execute/on the solution of the virtual machine. 1305324 Sun Microsystems has divided Java into three versions: J2SETM (JavaTM 2 Platform, Standard Edition) for client applications, and J2EETM (JavaTM 2 Platform, Enterprise Edition) for server-side applications. And J2METM (JavaTM 2 Platform, Micro Edition) specially developed for small handheld devices such as mobile phones and PDAs with slower computing power and slower processing speed. Above, the vast majority of mobile phone, PDA manufacturers have built-in computing environment meets the specifications of J2ME, which supports J2ME application or game program is also the largest number.
Java應用程式可分為Applet和Application兩種形式。 Java Applet是一個以java程式語言寫成的小程式,内嵌在網 頁中,當使用者存取這個網頁時,由支援java虛擬機器的瀏 覽器下載後在客戶端執行,並且將執行的結果顯示在瀏覽器 的視窗中。在J2ME環境,Java Applet被稱為MIDlet,而一 或多個MIDlet被編譯產生的位元碼是包裝在一個jAR (Java Archive)檔裡。第la圖所示係一 jAR標内容的示意圖。如 圖所示’ JAR檔案50裡除了包含有一或多個MIDlet的位元 碼60、61外,還包含了 MIDlet執行時所會用到的文字、圖 形、音效、影像等資源(resource) 70、71、72、73、以及一 個清單(Manifest)檔80。以下則是一個清單檔的範例: MIDlet-Name: HelloWorld MIDlet-Version: 2.0 MIDlet-Vendor: XYZ MIDlet-Description: a Sample MIDlet 6 1305324 MIDlet-Info-URL: http://www.XYZ.com/Hello MIDlet-Data-Size: 100 MIDlet-1: HelloMIDlet. /icons/hello.png. HelloMIDlet MicroEdition-Profile: MIDP-2.0 MicroEdition-Configuration: CLDC-1.0Java applications can be divided into Applet and Application. Java Applet is a small program written in the Java programming language. It is embedded in the web page. When the user accesses the web page, it is downloaded by the browser supporting the java virtual machine and executed on the client, and the result of the execution is displayed. In the browser's window. In the J2ME environment, a Java applet is called a MIDlet, and one or more MIDlets are compiled to produce a bit code that is wrapped in a jAR (Java Archive) file. Figure la is a schematic diagram showing the contents of a jAR standard. As shown in the figure, the JAR file 50 contains the bit code 60, 61 of one or more MIDlets, and includes resources such as text, graphics, sound effects, and images used when the MIDlet is executed. 71, 72, 73, and a list (Manifest) file 80. The following is an example of a manifest file: MIDlet-Name: HelloWorld MIDlet-Version: 2.0 MIDlet-Vendor: XYZ MIDlet-Description: a Sample MIDlet 6 1305324 MIDlet-Info-URL: http://www.XYZ.com/Hello MIDlet-Data-Size: 100 MIDlet-1: HelloMIDlet. /icons/hello.png. HelloMIDlet MicroEdition-Profile: MIDP-2.0 MicroEdition-Configuration: CLDC-1.0
請特別注意到上文中畫有底線的一列,註明了這個JAR檔裡 包含了一個名稱為HelloMIDlet的MIDlet、以及它的圖示的 位置/icon/hello.png等資訊。除了產生JAR檔外,一般程式設 計環境還會產生一個JAD (Java Descriptor)檔,以下所示是 一個JAD檔的範例: MIDlet-Name: HelloWorld MIDlet-Version: 2.0 MIDlet-Vendor: XYZ MIDlet-Description: a Sample MIDlet MIDlet-Jar-Size: 1024 MIDlet-Jar-URL: http://www.xvz.edu/app-dir/Hello.iar MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-2.0 JAD檔的内容基本上清單檔一樣,差別只在JAD檔多了上文 中畫有底線的二列,這兩列分別註明了 JAR檔的大小、以及 JAR 構所在的 URL ( Universal Resource Link)位置。 第lb圖所示係將MIDlet下載安裝到一手機上的習知環 境。在如圖所示的環境下,MIDlet下載的流程說明如下。首 先手機10經由行動通訊網路20、WAP (Wireless Access Protocol)閘道器(gateway) 30潮覽祠服器40。伺服器40 將HTML格式的網頁傳給WAP閘道器30,WAP閘遒器3〇 7 1305324 再把HTML格式的網頁轉譯成WML ( Wireless Markup Language)的格式再轉送給手機ι〇 (以下WAP閘道器30的 中間轉換作用予以省略)。手機10點選網頁中想要的 MIDlet,接著伺服器40將所點選的MIDlet的JAD檔傳回給 手機10,手機10支援J2ME的瀏覽器解譯收到的JAD檔取 得JAR檔的URL地址,並送出JAR檔的URL地址;伺服器 4〇就會根據這個URL地址回傳所要的jar檔;手機1〇收到 JAR檔後就會進行安裝該jAR檔裡的MIDlet以及其資源。 請參閱第lc圖’手機1〇會將jar檔解開並將其中的 MIDlet位元碼220、以及資源(例如文字資源230 )安裝到手 機的記憶體240。在第lc圖所示的例子中,當MIDlet位元碼 220在手機的java虛擬機器執行過程中,會呈現一個歡迎畫 面200,而畫面中的文字訊息21〇「歡迎光臨」就是存放在文 字資源230裡,而由MIDlet位元碼22〇由文字資源23〇取出 顯示在畫面200裡。其他wMIDiet位元碼執行時所會呈現的 晝面背景、圖示、影像、或是所播出的音效等,都是以這樣 的方式存放在㈣的資職案裡、包裝到Mr權、安裝到手 機的記憶體、然後在MIDlet位元碼執行時被取用。 -般的MIDlet都是如前所料事先準備好财在飼服器 上再下載安裝到手機或其他手持行動裝置裡。也就是說, 腦以會如何運行、會呈現如何的晝面、訊息、會發出如何Please pay special attention to the bottom line of the above picture, indicating that the JAR file contains a MIDlet named HelloMIDlet and its icon location /icon/hello.png. In addition to generating JAR files, the general programming environment also produces a JAD (Java Descriptor) file. The following is an example of a JAD file: MIDlet-Name: HelloWorld MIDlet-Version: 2.0 MIDlet-Vendor: XYZ MIDlet-Description: a Sample MIDlet MIDlet-Jar-Size: 1024 MIDlet-Jar-URL: http://www.xvz.edu/app-dir/Hello.iar MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-2.0 JAD file The content is basically the same as the list file. The difference is only in the JAD file. There are two columns with the bottom line in the above picture. The two columns indicate the size of the JAR file and the URL of the JAR structure (Universal Resource Link). Figure lb shows a conventional environment for downloading and installing a MIDlet to a mobile phone. In the environment shown in the figure, the flow of MIDlet download is described below. The first mobile phone 10 is browsed to the server 40 via the mobile communication network 20 and the WAP (Wireless Access Protocol) gateway 30. The server 40 transmits the HTML format webpage to the WAP gateway 30, and the WAP gater 3〇7 1305324 translates the HTML format webpage into the WML (Wireless Markup Language) format and forwards it to the mobile phone ι〇 (the following WAP gate) The intermediate switching action of the tracker 30 is omitted). The mobile phone 10 selects the desired MIDlet in the webpage, and then the server 40 transmits the JAD file of the selected MIDlet back to the mobile phone 10. The mobile phone 10 supports the J2ME browser to interpret the received JAD file to obtain the URL address of the JAR file. And send the URL address of the JAR file; the server 4〇 will return the required jar file according to the URL address; after receiving the JAR file, the mobile phone 1 will install the MIDlet and its resources in the jAR file. Referring to Figure lc, the mobile phone 1 will unpack the jar file and install the MIDlet bit code 220 and resources (e.g., text resource 230) into the memory 240 of the mobile phone. In the example shown in Figure lc, when the MIDlet bit code 220 is executed during the java virtual machine of the mobile phone, a welcome screen 200 is presented, and the text message 21 in the picture is "welcome" is stored in the text resource. 230, and the MIDlet bit code 22 is extracted from the text resource 23 and displayed on the screen 200. The background, illustration, image, or sound effect of the other wMIDiet bit code will be stored in the (4) case, packaged to Mr., installed. The memory to the phone is then taken when the MIDlet bit code is executed. The MIDlet is pre-prepared and ready to be downloaded and installed on a mobile phone or other handheld mobile device. In other words, how does the brain work, how it will appear, the message, and how it will be issued
S .1305324 的音效,從JAR檔被包裝完成、放在伺服器上時就已經被確 定下來、不能再改變了。然而隨著手機與其他各種手持行動 裝置上的遊戲或應用程式的蓬勃發展,如何讓這些遊戲或應 用程式更為生動活潑、乃至於可以讓使用者予以客製 (customize),因此成為遊戲或應用程式開發薇商所關注的研 發重點。 【發明内容】 本發明提出一種方法,利用網路的伺服機制,將Java應 用程式的程式模組及其執行所需的文字、聲音、圖片、與影 像等資源,用使用者所指定的其他模組、資源動態地加以置 換,再由網路的伺服機制重新加以編譯以產生新的Java應用 程式,再傳回到用戶端安裝執行,使得使用者得以客製化Java 應用程式,使Java應用程式的使用更為活潑。 本發明係實施於具有適當的軟硬體以進行Java應用程式 編譯、與一網路連線並提供網頁以供用戶端瀏覽、下載的伺 服機制内。本發明所提出的方法首先是提供一網頁介面給連 結到伺服機制的用戶端,網頁介面裡提供了一或多個選項, 每個選項代表一個可以經本方法客製化的Java應用程式。接 下來,本方法根據用戶端點選的Java應用程式,在該網頁介 面裡呈現一或多個客製化控制項,每一個控制項代表一個該 Java應用程式可以被客製化的資源或程式模組、以及其客製 9 1305324 化的方式。最後’伺服機制將該Java應用程式所有的原始碼 模組、以及所有所用到的資源檔案加以編譯產生新的Java應 用程式’然後伺服機制可以直接將新的java應用程式傳回給 用戶端安裝。 兹配合所附圖示、實施例之詳細說明及申請專利範圍, 將上述及本發明之其他目的與優點詳述於後。然而,當可了 解所附圖示純係為解說本發明之精神而設,不當視為本發明 範缚之定義。有關本發明範疇之定義,請參照所附之申請專 利範圍。 【實施方式】 本發明所提出的方法係實施在類似第lb圖所示的網路 環境中的至少一伺服器上。然而請注意到,在某些實施例中, WAP閘道H是和他器整合在—起’另外也有些實施例是沒 有WAP岐㈣,也還有些實關是將本方法分由二個或更 多個舰器來分擔執行。所以’以下本說明書以「伺服機制」 -詞來抽象的代表本方法所執行的環境,此伺㈣制至少具 有以下的特徵:⑴具有適當的軟硬體以進行_應用程式編 譯以及執行_適當的lava虛擬㈣;(2)騎適當的軟硬體以 提供HTML、WML、或其他適當的格式網頁以㈣戶端_ 覽器㈣、下載;(3)具有適當的軟硬體叫—網路連線,、用 戶端的瀏覽器可以透過這個網路連結到此伺服機制瀏覽其網 •1305324 頁。 用戶端可以是一手機、或是其他手持行動裝置、或者是 一般的筆記型電腦或桌上型電腦。同樣的,本說明書以「用 戶端」一詞來抽象的代表與本方法互動的各種可能的環境。 用戶端具有以下的特徵··(1)具有適當的軟硬體以運行一瀏覽 器以及一適當的Java虛擬機器以執行適當的Java應用程式; (2)具有適當的軟硬體以與一網路連線,用戶端的瀏覽器可以 透過這個網路連結到此伺服機制瀏覽其網頁。 介於用戶端與伺服機制之間的網路,可以是公眾網際網 路、2.5G或3G的行動數據網路、也可以是私人的專屬網路。 在本發明的各種實施例裡,其用戶端的部分多半是執行在 J2ME的環境裡,而其伺服機制則多以J2EE為環境。然需注 意的是,本發明的精神實不以特定的Java運算環境為限,以 就是說,其用戶端、伺服機制不限定為J2ME或J2EE的環境。 所以,以下的說明也不特別指明其運算環境,其所執行的也 不以MIDlet為限,本發明的精神其實也適用於任何適當的 Java應用程式(因為也是將資源與位元碼分開存放)。 以下為簡化起見還是以第lb圖所示的環境與MIDlet為 例說明。第2a圖所示係本發明一實施例的流程圖。如圖所示, 本發明所提出的方法首先在步驟1〇〇提供一網頁介面給連結 到伺服機制的用戶端。用戶端一般在其瀏覽器裡經由指定一 11 1305324 適當的URL地址來進行連結並觸發步驟100的執行。此外, 步驟100的執行也有可能是用戶端瀏覽其他網頁、或執行其 他程式時,經由其他的網頁、或是其他程式的^^乙連結進入 到這個網頁介面。網頁介面裡提供了一或多個選項,每個選 項代表一個可以經本方法客製化的MIDlet。步驟1〇〇接受用 戶端的點選後即進入到步驟110。 在步驟110裡’本方法根據用戶端點選的MIDlet,在該 網頁介面裡呈現一或多個控制項,每一個控制項代表一個該 MIDlet可以被置換的資源、以及指定新資源置換這個資源的 方式。以第lc圖的文字訊息210為例,為了讓使用者可以客 製化這個文字訊息,所以步驟U〇所呈現的控制項裡就會有 一個對應的控制項提供一或多種修改這個文字訊息210的方 法。比方說,在網頁介面裡,用戶端可以在一個欄位裡自行 輸入所要的新文字訊息、或是從網頁裡所預先提供的一些「罐 頭訊息」裡挑選。 前述的選項與控制項也是抽象的描述。選項是可由用戶 端選擇的項目,它可以是一個列表裡的項目、或是一個下拉 式表單裡的項目、或是一組圖示中的一個,或是其他適當的 作法。控制項則除了包含有選項外以選擇伺服機制内建的、 預先準備好的資源以外,還包含了接受用戶端輸入資源的方 式°接受用戶端輸入資源的方式視所要客製化的資源而有不 12 • 1305324 同的作法。比方說,針對前例網頁介面是提供一個欄位供用 戶端自行輸入文字資源(例如將「歡迎光臨」改為「你回來 了」)。如果是音效、圖形、或影像等資源,還可以接受使用 者以上載方式提供新的音效、圖形、或影像,也可以是一個 欄位供用戶端指定新資源所在的URL地址。換言之,步驟110 取得的新資源可以是伺服機制事先準備好的「伺服端資源」、 可以是由用戶端輸入、或上載的「用戶端資源」、也可以是用 URL定址的、位於網路其他地點的「網路資源」。本發明的精 神可以適用於任何Java所支援的資源,而非以前述的幾種資 源為限。 每一種可以客製化的資源都有一些限制,例如文字的長 度、影像的格式尺寸等,所以當用戶端指定的是用戶端資源、 或網路資源時’伺服機制會在—個額外的步驟12〇裡,對取 得的新資源進行檢驗以確定新資源符合限制。伺服端資源因 是伺服機制事先準備好的,不會有和限制不符的情形。如果 有任何不符限制的情形,伺服機制會將相關的提示訊息呈現 在網頁介面裡,並返回到步驟1 1〇供用戶端改用其他資源。 此外步驟12G還可以提供的是在網頁介面裡模擬新資源加入 到MIDlet以後的在用戶端執行的效果。 第2b圖所不係第2a圖的實施例執行過程中飼服機制的 儲存空間的示意圖《«如圖所示,伺服機制具有—適當的儲存 13 -Ϊ305324 4間3〇〇。這個儲存空間300通常是由伺服機制的一或多個 硬式磁碟機所提供、也可以是由網路磁碟機(networked drive ) 所提供的空間、或其他適當的機制。儲存空間300包含有一 個「程式庫」310、一個「資源庫」330、以及一個暫存區320。 這裡所謂的「庫」所代表的是一群資料的集合,它可以是一 資料庫、或者也可以只是一個檔案系統的目錄等等。程式庫 310裡包含了所有MIDlet的原始碼(source code )模組(或 ’ 者還有編譯後的位元碼)、以及所有該MIDlet所用到的資源 檔案。在步驟1〇〇當用戶端選定一個MIDlet時,這個MlDlet 的原始碼模組311、以及所有該MIDlet所用到的資源構案312 都會被複製一份到暫存區320裡(圖中用321、322表示)。 資源庫330所包含的就是伺服機制事先準備好的所有的和服 端資源332。在步驟11〇取得的新資源,如是從資源庫33〇 選出,就直接覆蓋暫存區320裡對應的資源檔案322 (圖中 # 以網底表示的檔案)。如果是由用戶端輸入、或上栽的、或是 • 用URL定址的資源,則是經過步驟i2〇驗證後再覆蓋暫存區 • 320裡對應的資源檔案322。至於步驟12〇在網頁介面裡模擬 新資源加入到MIDlet以後的執行的效果,也很容易就可以達 成了,因為暫存區32〇裡有完整的MIDlet原始碼模組321、 以及所有該MIDlet所用到的資源檔案322,伺服機制原則上 只要予以編譯然後在其Java虛擬機器裡執行即可。步驟 14 .1305324 可以是步驟110每取得一個新資源即進行一次,也可以是步 驟110取得所有新資源後才進行。 最後,用戶端完成所要的客製化後,流程進入到步驟 130。在步驟130中,伺服機制將暫存區32〇裡的MIDlet原 始碼模組321、以及所有該MlDlet所用到的資源檔案322加 以編譯產生包含新資源的jAR與其對應的JAD檔案然後伺 服機制可以直接將JAD樓傳回給用戶端、或是直接傳回jAR 檔案、或是呈現在網頁介面裡由用戶端點擊下載JAD、或JAR 標案。用戶端取得JAD或JAR稽案後的安裝等過程就如同「先 刖技術」所描述的一般’在此就不贅述。 除了置換文字、音效、圖形、影像等資源外,從前述的 說明中不難發現,因為MIDlet的原始碼可以包含多個模組, 所以相同的方法與第2a圖所示的流程步辑還可以用來置換其 中某些特定的原始碼模組’來改變、調整MIDlet的程式邏輯 (例如改變遊戲的結局、規則、遊戲裡某個人物的全部互動 方式等),其中的差別主要只在由資源檔案的置換變成原始碼 模組標案的置換罷了。不過需要特別指出的是:(1)由於牵涉 到和其他原始碼模組的匹配,所以雖然技術上可能,但原則 上是不接受用戶端自行上載原始碼模組,只能從一「模組庫」 中選用伺服機制所事先準備的好的模組;(2)模組庫其實和 程式庫报像,除了原始碼模組以外,一這個原始碼模組本身 15 1305324 所會用到的所有資源檔案也會—併存放在模組庫中,而且在 步驟11G巾所較的原始碼她,會連同其所需㈣源槽案, -起由模組庫複製到暫存區裡;(3)因為是伺服機制所事先 準備的好的模虹’所以步驟12〇不需要驗證但還是可以提 供模擬的用戶端運作效果。由以上的敛述,相信也不難理解 在本發明的某些實關裡,資源的置換以及原始碼模組的置 換可以合併實施。 藉由以上較佳具體實施例之詳述’係希望能更加清楚描 述本創作之特徵與㈣,而並相上述_露的較佳具體= 施例來對本_之糾加以限制。喊地,其目的是希望能 涵蓋各種改變及具相等性的安排於本創作所欲申請之專利^ 圍的範内。 【圖式簡單說明】 第la圖所示係一 jar構内容的示意圖。 第lb圖所示係將MIDlet下載安裝到一手機上的習知環境。 第lc圖所示係MIDlet在手機上執行的示意圖。 第2a圖所示係本發明一實施例的流程圖。 第2b圖所示係第2a圖的實施例執行過程中伺服機制的儲存 空間的示意圖。 【主要元件符號說明】 16 1305324 10 手機 20 網路 30 WAP閘道器 40 伺服器 50 JAR檔 60,61 MIDlet位元碼 70 〜73 資源 80 清單檔 100〜130 流程步驟 200 歡迎畫面 210 文字訊息 220 MIDlet位元碼 230 文字資源 240 用戶端的記憶體 300 儲存空間 310 程式庫 311 原始碼模組 312 資源檔案 320 暫存區 321 原始碼模組 322 資源檔案 330 資源庫 332 資源檔案 17The sound of S.1305324 has been determined from the JAR file and placed on the server, and can not be changed. However, with the proliferation of games and applications on mobile phones and various other handheld mobile devices, how to make these games or applications more lively, and thus allow users to customize, thus become a game or application. The program develops the research and development focus of Weishang. SUMMARY OF THE INVENTION The present invention provides a method for utilizing a servo mechanism of a network to use a program module of a Java application and characters, sounds, pictures, and images required for execution, and other modes specified by the user. Groups and resources are dynamically replaced, and then recompiled by the network's servo mechanism to generate a new Java application, which is then passed back to the client installation and execution, enabling the user to customize the Java application and make the Java application The use is more lively. The present invention is implemented in a servo mechanism with appropriate software and hardware for Java application compilation, connection to a network, and web page for browsing and downloading by the client. The method proposed by the present invention first provides a web interface to the client connected to the servo mechanism. One or more options are provided in the web interface, and each option represents a Java application that can be customized by the method. Next, the method presents one or more customized controls in the web interface according to the Java application selected by the user endpoint, and each control item represents a resource or program that the Java application can be customized. Module, and its custom 9 1305324 way. Finally, the servo mechanism compiles all the source code modules of the Java application and all the resource files used to generate a new Java application. Then the servo mechanism can directly transfer the new java application back to the client installation. The above and other objects and advantages of the present invention will be described in detail with reference to the accompanying drawings and claims. However, it is to be understood that the appended drawings are merely illustrative of the spirit of the invention and are not to be construed as a limitation. For the definition of the scope of the invention, please refer to the attached patent application. [Embodiment] The method proposed by the present invention is implemented on at least one server in a network environment similar to that shown in FIG. However, please note that in some embodiments, the WAP gateway H is integrated with the other device. In addition, some embodiments are not WAP (four), and some implementations are to divide the method into two or More ships to share the implementation. Therefore, the following description uses the "servo mechanism" - the word abstract to represent the environment in which the method is implemented. This system has at least the following characteristics: (1) has appropriate software and hardware for _ application compilation and execution _ appropriate Lava virtual (4); (2) ride appropriate software and hardware to provide HTML, WML, or other appropriate format web pages to (4) the terminal browser (four), download; (3) with appropriate software and hardware called - network Connected, the browser of the client can connect to this servo mechanism through this network to browse its webpage 1305534. The client can be a cell phone, or other handheld mobile device, or a general notebook or desktop computer. Similarly, this specification abstracts the various possible environments in which the method interacts with the term "user". The client has the following features: (1) has appropriate software and hardware to run a browser and a suitable Java virtual machine to execute the appropriate Java application; (2) has appropriate software and hardware to work with a network Through the connection, the browser of the client can connect to the servo mechanism to browse its webpage through this network. The network between the client and the servo mechanism can be a public internet network, a 2.5G or 3G mobile data network, or a private dedicated network. In various embodiments of the present invention, most of the user terminals are implemented in the J2ME environment, and the servo mechanism is mostly J2EE. It should be noted that the spirit of the present invention is not limited to a specific Java computing environment, that is, the user terminal and the servo mechanism are not limited to the J2ME or J2EE environment. Therefore, the following description does not specifically indicate its computing environment, and its implementation is not limited to MIDlets. The spirit of the present invention is also applicable to any suitable Java application (because the resources are also stored separately from the bit code) . The following is an illustration of the environment and MIDlet shown in Figure lb for simplicity. Figure 2a is a flow chart showing an embodiment of the present invention. As shown in the figure, the method proposed by the present invention first provides a web interface to the client connected to the servo mechanism in step 1. The client typically links in its browser by specifying an appropriate URL address of 11 1305324 and triggers execution of step 100. In addition, the execution of step 100 may also be when the user browses other web pages or executes other programs, and enters the web interface through other web pages or other programs. One or more options are provided in the web interface, each option representing a MIDlet that can be customized by this method. Step 1: After accepting the user's click, the process proceeds to step 110. In step 110, the method presents one or more control items in the web interface according to the MIDlet selected by the user endpoint, each control item represents a resource that the MIDlet can be replaced, and a new resource is designated to replace the resource. the way. Taking the text message 210 of the lc picture as an example, in order to allow the user to customize the text message, there is a corresponding control item in the control item presented in step U〇 to provide one or more modifications to the text message 210. Methods. For example, in the web interface, the user can input the desired new text message in a field or select from some “canned messages” provided in the web page. The aforementioned options and controls are also abstract descriptions. An option is a project that can be selected by the user. It can be a list of items, a drop-down form of an item, or a set of icons, or other appropriate method. In addition to the options, the control item selects the resources prepared in advance by the servo mechanism, and also includes the way to accept the input resources of the client. The way to accept the input resources of the user terminal depends on the resources to be customized. Not 12 • 1305324 The same approach. For example, for the previous example web interface, a field is provided for the user to input text resources (for example, "Welcome" to "You are back"). If it is a sound, graphics, or image, it can also accept that the user can provide new sound effects, graphics, or images by uploading. It can also be a field for the client to specify the URL address of the new resource. In other words, the new resource obtained in step 110 may be a "server resource" prepared by the servo mechanism in advance, may be a "user resource" input by the user terminal, or uploaded, or may be addressed by a URL, and located on the network. The "network resources" of the location. The spirit of the present invention can be applied to any resource supported by Java, and not limited to the aforementioned resources. Each of the resources that can be customized has some restrictions, such as the length of the text, the format size of the image, etc., so when the client specifies the client resource, or network resource, the 'servo mechanism will be in an extra step. In 12 ,, the new resources obtained are tested to determine that the new resources meet the restrictions. The server resources are prepared in advance by the servo mechanism, and there is no case where the restrictions do not match the restrictions. If there are any cases where the restrictions are not met, the servo mechanism will present the relevant prompt message in the web interface, and return to step 1 1 for the user to use other resources. In addition, step 12G can also provide the effect of performing the execution on the user side after the new resource is added to the MIDlet in the web interface. Figure 2b is a schematic view of the storage space of the feeding mechanism during the execution of the embodiment of Figure 2a. « As shown, the servo mechanism has - appropriate storage 13 - Ϊ 305324 4 3 〇〇. This storage space 300 is typically provided by one or more hard disk drives of the servo mechanism, or may be provided by a networked drive, or other suitable mechanism. The storage space 300 includes a "library" 310, a "resource library" 330, and a temporary storage area 320. The so-called "library" here refers to a collection of materials, which can be a database, or just a directory of a file system. The library 310 contains all of the MIDlet's source code modules (or 'and compiled bitcodes') and all the resource files used by the MIDlet. In step 1 , when the client selects a MIDlet, the source code module 311 of the M1Dlet and all the resource structures 312 used by the MIDlet are copied to the temporary storage area 320 (using 321 in the figure). 322 indicates). Included in the repository 330 are all the servant resources 332 that are prepared in advance by the servo mechanism. The new resource obtained in step 11 is selected from the resource library 33, and directly covers the corresponding resource file 322 in the temporary storage area 320 (the file indicated by the network bottom in the figure). If it is a resource input by the user terminal, or uploaded, or • URL-addressed, it is verified by step i2 and then overwrites the corresponding resource file 322 in the temporary storage area 320. As for the effect of step 12 in simulating the execution of new resources added to the MIDlet in the web interface, it is easy to achieve because the full MIDlet source code module 321 is included in the temporary storage area 32, and all the MIDlets are used. In the resource file 322, the servo mechanism can be compiled in principle and executed in its Java virtual machine. Step 14 .1305324 may be performed once every time a new resource is obtained, or may be performed after step 110 obtains all new resources. Finally, after the client completes the desired customization, the process proceeds to step 130. In step 130, the servo mechanism compiles the MIDlet source code module 321 in the temporary storage area 32, and all the resource files 322 used by the M1Dlet to generate a jAR containing the new resource and its corresponding JAD file, and then the servo mechanism can directly The JAD building is transmitted back to the client, or directly back to the jAR file, or presented in the web interface by the user to click to download the JAD, or JAR standard. The process of installing the JAD or JAR audit file by the client is as described in the "Previous Technology" and will not be described here. In addition to replacing text, sound effects, graphics, images and other resources, it is not difficult to find from the above description, because the original code of the MIDlet can contain multiple modules, the same method and the flow step shown in Figure 2a can also be used. The program logic used to replace some of the specific source code modules to change and adjust the MIDlet (such as changing the ending of the game, rules, all interactions of a character in the game, etc.), the difference is mainly in the resources The replacement of the file becomes a replacement for the original code module. However, it should be specially pointed out that: (1) Due to the matching with other source code modules, although technically possible, in principle, the user terminal is not allowed to upload the original code module by itself, only from a "module". In the library, a good module prepared by the servo mechanism is selected; (2) the module library and the library report, except for the original code module, all of the original code module itself 15 1305324 will be used. The resource file will also be stored in the module library, and in the step 11G, the original code will be copied to the temporary storage area together with the required (4) source slot; (3) Because it is a good model that is prepared in advance by the servo mechanism, step 12 does not require verification but can still provide simulated client operation. From the above, it is believed that it is not difficult to understand that in some implementations of the present invention, the replacement of resources and the replacement of the original code modules can be implemented in combination. With the above detailed description of the preferred embodiments, it is desirable to more clearly describe the features of the present invention and (4), and to limit the limitations of the present invention. Shouting, the purpose is to cover all kinds of changes and equal arrangements in the scope of the patents to be applied for in this creative office. [Simple description of the drawing] The first drawing shows a schematic diagram of the contents of a jar structure. Figure lb shows a conventional environment for downloading and installing a MIDlet to a mobile phone. Figure lc shows a schematic diagram of a MIDlet executing on a mobile phone. Figure 2a is a flow chart showing an embodiment of the present invention. Figure 2b is a schematic illustration of the storage space of the servo mechanism during the execution of the embodiment of Figure 2a. [Main component symbol description] 16 1305324 10 Mobile phone 20 Network 30 WAP gateway 40 Server 50 JAR file 60, 61 MIDlet bit code 70 ~ 73 Resource 80 List file 100~130 Process step 200 Welcome screen 210 Text message 220 MIDlet bit code 230 text resource 240 client memory 300 storage space 310 library 311 source code module 312 resource file 320 temporary storage area 321 source code module 322 resource file 330 resource library 332 resource file 17