Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

J2ME: Build package with antenna

Posted on 2004-10-25
5
Medium Priority
?
755 Views
Last Modified: 2012-05-05
I use IDEA 3.0.5, ant 1.5.1 (1.6.1), and new antenna, WTK2.1
There is example build.xml from Master jimmack
 http://www.experts-exchange.com/Programming/Wireless_Programming/Q_20971796.html#10949699

When I build package (JAR/JAD) with NDS 2.2 for J2ME, package is worked properly.

I don`t understand how ant make (build) all tasks. I can do it, only if I set depends for target.
In second, my JAR is bad. When I build JAR with Nokia DevSuit JAR work properly, but when I run ant (from command line or via IDEA) JAR is bad.
After start midlet phone (or emulator) generate exception:
"A class was not fount during execution. It is possible that preberifying has failed. If you compiled the classes using J2SDK 1.4.1 or later, please check that you used compiler option "-target 1.1",which generates class files gor for all Java SDKs. Also note that the default emulator used for  preverifying must support the APIs which are used by classes in the ckass path."

In task wtkbuild target = 1.1

My package task
<wtkpackage jarfile="${MIDlet-Name}.jar" jadfile="${MIDlet-Name}.jad" basedir="${ProjDir}/classes">
      <fileset dir="${ProjDir}/res"/>
      <manifest>
        <attribute name="Built-By" value="${user.name}"/>
        <attribute name="MicroEdition-Configuration" value="${ME-Conf}"/>
        <attribute name="MIDlet-Name" value="${MIDlet-Name}"/>
        <attribute name="MIDlet-Icon" value="/${MIDlet-Icon}"/>
        <attribute name="MIDlet-Version" value="${MIDlet-Version}"/>
        <attribute name="MIDlet-Vendor" value="${MIDlet-Vendor}"/>
        <attribute name="MIDlet-1" value="${MIDlet-Name}, /${MIDlet-Icon}, ${MIDlet-Class}"/>
        <attribute name="MicroEdition-Profile" value="${ME-P}"/>
      </manifest>
    </wtkpackage>
0
Comment
Question by:yobser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Accepted Solution

by:
petmagdy earned 500 total points
ID: 12419814
I can't under stand this statment "I don`t understand how ant make (build) all tasks. I can do it, only if I set depends for target"

Second ur ant build.xml must do the following:

1- Preverify after compiling the classes
2- package the JAR with the right MANIFEST.MF that its attributes match the correspondnet in urapp.jad file
3- the JAD file msut contain the right jar size in attribute MIDlet-Jar-Size

refer to the build.xml of the smart ticket demo at:

http://java.sun.com/blueprints/code/index.html

good luck
0
 

Author Comment

by:yobser
ID: 12420084
I mean "make all target, if I don`t set depends". I know answer ;-) NOHOW

I`ll attempt your link.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Coaxial cable bending There are several factors that govern the selection of coaxial cable for your Machine to Machine (M2M) application: the location of cable runs, either indoor or outdoor, inside or outside an enclosure, maximum bending and the…
Hopefully this article will help someone who's had the same issues I had. I have a Dell Wireless 1390 WLAN Mini-Card and Windows 7, and for the past couple of days I was beyond frustrated because my wireless laptop was not able to access the Inte…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question