Antenna package the j2s program

Source: Internet
Author: User
Antenna package the j2s program
Author: Jeru
Many people like to use ant to compile and package Java applications. They can easily generate war packages and run them in J2EE containers. I also saw an article on sun's website.
How to use ant to package the j2_program: http://wireless.java.sun.com/midp/articles/ant/
I tested it. It's not bad, but the disadvantage is that I need to write the manifest. mf and jad files in advance, so I am unwilling to continue searching on google,
Finally found a very powerful ant expansion package, specifically package the j2_program, very practical: http://antenna.sourceforge.net/
You can automatically compile, pre-compile, and generate jar, jad, and prc (the runtime program of palm) at one time, or even disrupt the code. All you need to do is to modify the parameters in build. xml.
The following uses UIDemo as an example to share with you the packaging process (this article applies to users with ant experience)
First, assume that you have used ant, ant_home environment variables have been set up, add the antenna-bin.jar downloaded from the above site to classpath
I created a UIDemo directory under D: My folderprojectsj2and copied the res and src directories under J2MEWTKappsUIDemo here,
Create a build. xml file under the same level Directory. The content of build. xml is as follows, which must be modified only when Chinese annotations are made:
<? Xml version = "1.0"?>
<Project name = "UIdemo" default = "build" basedir = ".">
<! -- Define the Wireless Toolkit home directory. Needed by the tasks. -->
<! -- Set the J2MEWTK path. -->
<Property name = "wtk. home" value = "c: j2mewtk"/>
<! -- Define some additional properties for this project. Not required. -->
<! -- Set the midlet name and root path. -->
<Property name = "midlet. name" value = "UIDemo"/>
<Property name = "midlet. home" value = "."/>
<! -- Define the tasks. -->
<Taskdef name = "wtkjad" classname = "de. pleumann. antenna. WtkJad"/>
<Taskdef name = "wtkbuild" classname = "de. pleumann. antenna. WtkBuild"/>

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.