📄 readme.txt
字号:
// Copyright 2002 Nokia Corporation.
//
// THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
// EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
// FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
// OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
// ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
// OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
// SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
// RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
// OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
// BY THIRD PARTIES
//
// Furthermore, information provided in this source code is preliminary,
// and may be changed substantially prior to final release. Nokia Corporation
// retains the right to make changes to this source code at
// any time, without notice. This source code is provided for informational
// purposes only.
//
// Nokia and Nokia Connecting People are registered trademarks of Nokia
// Corporation.
// Java and all Java-based marks are trademarks or registered trademarks of
// Sun Microsystems, Inc.
// Other product and company names mentioned herein may be trademarks or
// trade names of their respective owners.
//
// A non-exclusive, non-transferable, worldwide, limited license is hereby
// granted to the Licensee to download, print, reproduce and modify the
// source code. The licensee has the right to market, sell, distribute and
// make available the source code in original or modified form only when
// incorporated into the programs developed by the Licensee. No other
// license, express or implied, by estoppel or otherwise, to any other
// intellectual property rights is granted herein.
Release Notes - 'Sum' MIDlet (December 2002)
======================================================
These notes are only intended as a brief guide for building and running
the example. A more detailed description of the design of this MIDlet
example has been provided as a separate design document.
1. Build environment
--------------------
'JBuilder' with 'MobileSet' plus 'Nokia Developers' Suite
for J2ME' were used to build and run the MIDlet on a Windows test
environment. Installation, configuration and use of these tools is beyond
the scope of the release notes.
A build.xml file is also included to build the MIDlet using ant
It uses the MIDP tasks included in the Antenna project. It can be found
at http://antenna.sourceforge.net. Copy the antenna-bin.jar file to
the ANT_HOME/lib directory
If necessary to customize some properties build.properties can be used
2. Building and running the example
-----------------------------------
Step 1. Open the Sum.jpx project
This project contains all the .java source files contained
in the subdirectory '.\src\example\sum'.
Notes:
- The 'Project' / 'Project Properties' windows can be used
to set project properties related to building and running a MIDlet.
- (The 'Tools' / 'Nokia Developer's Suite for J2ME(TM)' /
'Create Application Descriptor' can be used to create a .jad and
.jar files. These have already been created as a convienence.)
Step 2. Building the MIDlet
These JBuilder mechanisms were used to build the MIDlet classfiles:
'Project' / 'Make Project "Sum.jpx"'
'Project' / 'Rebuild Project "Sum.jpx"'
You should see a message like: 'Build succeeded. Build took 4 seconds.'
Once the project has been built at least once as in Step 1,
one can use:
'Tools' / 'Nokia Developer's Suite for J2ME' / 'Recreate'
to recreate the jar file.
Step 3. Running the MIDlet
- This is a MIDlet is the client part of a client/server example.
To run it depends that one has first successfully compiled and
installed the equivalent servlet from:
.../midp/examples/midp1_0/servlet/Sum
- You may have to modify the parameter 'Servlet-URL'
in the .jad file as appropriate to your local installation of
the servlet.
- When using an HTTP proxy, one may wish to check the relevant
settings in:
'Tools' / 'Nokia Developer's Suite for J2ME' / 'Configure Emulator'
- After having done the above:
Use this mechanism to run the example:
'Run' / 'Run Project'
The 'Project' / 'Project Properties' / 'Run' / 'MIDlet' tab
may be used to run the example using via the .jad and .jar files.
Step 4. Preparing the MIDlet for OTA download
One may wish to perform various optional steps at this point,
such as obfuscation, optimized compiling, jar file compression, etc.
These are beyond the scope of these release notes.
Because a variety of methods could be used to create the final .jad
and .jar files used for OTA downloading of the MIDlet:
- I recommend checking that the attributes in the .jad and
.jar manifest files are correct, and that they match EXACTLY when
present in both. One should think about the reasons why some
arbitrary actual MIDP device might refuse to run a MIDlet
(JAR size mismatches, attribute mismatches, etc.)
- The 'check.sh' script gives a model of the types of things one
might want to double-check (e.g. attribute values should match,
MIDlet-Jar-Size should match the actual size, MIDlet-Jar-URL
should be correct, etc.) in the process of preparing .jad and
.jar files for use in OTA downloading. It is a guide and may
not be an exhaustive list.
- It is worth emphasizing that the mandatory parameters of the
.jad and .jar manifest files should be present, should be correct,
and should match for those attributes which are present in both.
The MIDP 1.0 specification covers the mandatory .jad and .jar
manifest attributes.
Consult the relevant documentation of your build tools, for any
other questions or issues that may arise.
3. Building and running the example using ant
---------------------------------------------
Having ant and antenna installed the MIDlet can be built using the
'ant' or ant 'build' command.
For a clean build use the
'ant cleanbuild' command
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -