The web Javawebstudio 20052005 supports J2ME development, with the WTK2.2 version, which provides 15 J2ME development project templates. The steps to develop mobile gaming via the J2ME template provided by Javawebstudio 2005 are as follows:
(1) Start Javawebstudio
(2) using J2ME template to build new mobile game project
Create a new project from the file-new Project menu.
In the New Project dialog box, select the project type JME application project, the template name Select Implement Menu Template, and the project name is "Jmemenu".
The resulting new project directory structure is as follows:
(3) The main entrance and implementation code of this project are included in the Firstmidlet.java file, which reads as follows:
(4) The project description document Myfirst.jad content as follows:
Midlet-name:helloworld
midlet-version:1.0.0
Midlet-vendor:sun Microsystems, Inc.
Midlet-description:sample Hello World MIDlet
midlet-info-url:http://java.sun.com/j2me/
Midlet-jar-url:the Jar File URL
Midlet-jar-size:the Jar File Size
microedition-profile:midp-1.0
microedition-configuration:cldc-1.0
MIDlet-1: Myfirstmidlt, My. Firstmidlet
In the Myfirst.jad file, one particular note, Midlet-jar-size, describes the size of the Jar wrapper file generated by the project, which is changed after the program is modified. In Javawebstudio, at compile time ant invokes the size of the SetJarSize.exe file in the \javawebstudio\bin directory to extract the project jar file, which is automatically filled in.
(5) In this project, the obfuscation is Retroguard, and the class file is contained in the Retroguard.jar library. In addition, Javawebstudio also provides the source program for the Retroguard obfuscation, which is called "Retroguard template" under the \javawebstudio\bin\ template \JME application project \ Directory.
(6) Compiling, running
The compiled and run configurations are all in the Build.xml file, and compile-time Javawebstudio will be compiled and run through an ant call Build.xml file. The contents of the Build.xml file are as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.