MIDP_Example_Applications_v1_4
所属分类:电子书籍
开发工具:Java
文件大小:2326KB
下载次数:24
上传日期:2004-10-13 10:22:38
上 传 者:
sysdy
说明: J2ME MIDP_Example_Applications
文件列表:
midp (0, 2004-04-16)
midp\examples (0, 2004-04-16)
midp\examples\bluetooth (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\bak (0, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\btl2capEcho.jad (360, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\btl2capEcho.jar (35669, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\btl2capEcho.jpx (2910, 2004-04-01)
midp\examples\bluetooth\btl2capEcho\btl2capEcho.jpx.local (597, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\build.properties (2699, 2004-04-01)
midp\examples\bluetooth\btl2capEcho\build.xml (6088, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\check.sh (4264, 2002-10-25)
midp\examples\bluetooth\btl2capEcho\classes (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\classes\example (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\client (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\ClientForm.class (6662, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\client\ClientConnectionHandler$Writer.class (2681, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\client\ClientConnectionHandler.class (5273, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\client\ClientConnectionHandlerListener.class (650, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\client\ConnectionService.class (3199, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\ErrorScreen.class (1584, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\LogScreen.class (3697, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\MIDletApplication.class (8067, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\server (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\ServerForm.class (8922, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\server\ServerConnectionHandler$Writer.class (2681, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\server\ServerConnectionHandler.class (6135, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\server\ServerConnectionHandlerListener.class (606, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\ServiceDiscoveryList.class (12168, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\SettingsList.class (4638, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\classes\example\btl2capecho\TextScreen.class (1413, 2004-04-02)
midp\examples\bluetooth\btl2capEcho\res (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\res\logo.png (245, 2004-03-03)
midp\examples\bluetooth\btl2capEcho\src (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\src\example (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\src\example\btl2capecho (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\src\example\btl2capecho\client (0, 2004-04-16)
midp\examples\bluetooth\btl2capEcho\src\example\btl2capecho\ClientForm.java (9638, 2004-03-03)
... ...
// Copyright 2003 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 - Example MIDlets (December 2003)
====================================================================
These notes are only intended as a brief guide for building and running
the set of MIDlet and servlet examples included in this file. A more
detailed description of building each example is included in the particular
directory. A thorough discussion about the design of each example has been
provided as a separate document.
1. Structure
------------
This file contains the examples divided in different sections under each
subdirectory. At the highest level the examples are divided on using MIDP 1.0,
the Multimedia API or the Wireless Messaging API. The MIDP 1.0 examples are
further divided into MIDP 1.0 MIDlets, MIDlets using the Nokia UI API
and server side services used by some of the examples, under jaxrpc and servlet
dirs
The overall structure is shown below
- examples
- midp1_0
- jaxrpc : RPC service for Web Services Example
- midlet : MIDlets using only MIDP 1.0
- midletNokiaUI : MIDlets using MIDP 1.0 and Nokia UI API
- servlet : Server side servlets
- mma : MIDlets using the Multimedia API
- wma : MIDlets using the Wireless Messaging API or Nokia SMS API
- midp2_0
- midlet : MIDlets using only MIDP 2.0
- servlet : Server side servlets
- server : Simple J2SE server test servers
- bluetooth
- btsppEcho : Simple Bluetooth 'Echo' MIDlet using RFCOMM / SPP
(It can be started in either client or server mode.)
- btl2capEcho : Simple Bluetooth 'Echo' MIDlet using L2CAP
(It can be started in either client or server mode.)
2. Third-party libraries
------------------------
Some of the examples require third-party libraries not included in this file.
In each of those examples there are directions on where to find the needed
libraries be it in binary or source code format
However a minimal set of third-party libraries is always required. Those include
a MIDP SDK, servlet.jar to build the server side servlets, and ant and the
required extensions if ANT is used to build the examples
3. Using ANT for the MIDP Examples
----------------------------------
You can use ant to build these examples. Ant is a java based build tool which
uses an xml file (normally is build.xml) to define building targets. Each target
may contain actions such as compile the source code, clean the compiled files,
pack compiled files into jar files, etc.
Normally ant is called in the command line using the command ant [target] and
this will execute the given target and any dependencies. Many IDEs and
editors support ANT for building projects. Configuring those IDEs is beyond
the scope of this document
The examples make use of two ANT extensions to facilitate certain steps like
obfuscation and preverification. The extensions used are antenna and proguard.
In these examples at each subdirectory there is a build.xml file which can build
the examples at the current level and those below. For instance the build.xml
under wma will build all the MIDlets under wma, otherwise you could go directly
to one of the examples and use the build.xml to build only the given example.
Each build.xml of a higer level contains the same set of targets:
- validate: Checks that all the necessary files are accessible.
This is especially useful for examples that use optional packages
- build: Build the basic set of projects, i.e. those not needing third party
libraries
- buildall: Build all the projects assuming that each has the required third
party libraries
- cleanbuild: Performs a cleaning of compiled files and build the project
build.xml specific for a given example doesn't include the buildall target
and the build target will perform the build.
4. Configuring ANT properties
-----------------------------
The build.xml finds need to locate some of resources on your system, for
example the location of the MIDP SDK used to build the example. Those locations
are defined in properties in each build.xml file. In particular the location of
the MIDP SDK is defined using the "wtk.home" and "wtk.midpapi" properties.
Since the location of these resources may vary from system to system the value
of these properties has to be modified.
The easiest way to configure this is to change the properties in the file
build.properties included at each level. If you change the properties there,
they are imported into build.xml. Furthermore the properties set in this way
are propagated to the directories below, so that configuring the files properly
at one level will also configure the levels at the directories below.
4. Installing ANT and required extensions
-----------------------------------------
In this section installing ant and the required ant extensions is included.
If you have already ant installed you can jump to the step 4.2 where the
extension installation is explained.
4.1. Installing ant
-------------------
The examples were built using ANT version 1.5.3. ANT is being developed and
distributed by the Apache Software Foundation and can be located at
http://ant.apache.org/.
The most current version is always available in binary and source code version
under the download section. For these examples we want to get the binary version,
which is distributed in files like "apache-ant-1.5.3-bin.zip",
"apache-ant-1.5.3-bin.tar.gz" or "apache-ant-1.5.3-bin.tar.bz2"
Download this file and uncompress it to any folder. For example
C:\Java\apache-ant-1.5.3 in Windows or /usr/java/apache-ant-1.5.3 in Linux.
This location is normally indicated by the variable ANT_HOME
Under the ant directory, the bin subdirectory contains scripts to call ant
using the command line. It is normally useful to include the directory "bin" in
the PATH to make it easier to call.
Ant also requires you to set the JAVA_HOME variable to point to the location
of the JDK used to execute ant. Notice that this is a normal JDK not the MIDP
SDK
4.3 Installing antenna
----------------------
Antenna is a set of open source ant tasks that facilitate the development of
MIDlets. Antenna can be found at http://antenna.sourceforge.net/ and the version
used for these examples is 0.9.1
To install antenna you have to go the web page given above and go to download.
We are interested in the antenna-bin.jar. Download that file and copy it
to ANT_HOME/lib
4.4 Installing proguard
-----------------------
Proguard is an open source obfuscator, which is well suited to obfuscate MIDlets
that would otherwise be too big or problematic to use in a MIDP device.
Proguard can be found at http://proguard.sourceforge.net/, then go to downloads
and get the latest version either as "proguard1.7.2.zip" or
"proguard1.7.2.tar.gz"
Uncompress the file and proguard will be installed to a certain directory.
To use it with ant it is necessary to copy the file proguard.jar, located at
proguard1.7.2/lib/proguard.jar, to ANT_HOME/lib
4.5 Troubleshooting
-------------------
In case you get an error saying "taskdef class some.class.name cannot be found",
some of the extensions are not properly installed.
You can check whether the tasks are properly installed by calling the command
ant -diagnostics
Among other things this command will show whether the files were correctly copied
under the ANT_HOME/lib directory. ant -diagnostics will show a section called
ANT_HOME/lib that should contain among other files antenna-bin.jar and proguard.jar
If they are not go to the steps 4.3 and 4.4
近期下载者:
相关文件:
收藏者: