Eclipse and J2ME support through antenna

Discussion in 'Java' started by Scorpion, Aug 19, 2003.

  1. Scorpion

    Scorpion Guest

    Hello,

    I wanted to build my j2me applications through Eclipse with antenna, but
    i can't seem to fix this problem. When i turn preverifying on, it always
    says "BUILD FAILED: <file>: Preverification failed (result=1)". Can
    anyone tell me what the problem might be? The Wireless Toolkit is 2.0,
    JDK is 1.4.2.

    Thanks in advance.

    ----------------

    build:
    [wtkpackage] New version is 1.8

    [wtkpackage] Building jar:
    C:\home\coding\projects\midlets\helloworld\HelloWorld.jar

    [wtkpackage] Updating JAD file
    C:\home\coding\projects\midlets\helloworld\HelloWorld.jad

    [wtkpreverify] Preverifying
    C:\home\coding\projects\midlets\helloworld\HelloWorld.jar

    [wtkpreverify] BUILD FAILED:
    file:C:/home/coding/projects/midlets/helloworld/build.xml:79:
    Preverification failed (result=1)

    ----------------
     
    Scorpion, Aug 19, 2003
    #1
    1. Advertising

  2. Scorpion

    Tim Tyler Guest

    Scorpion <> wrote:

    : I wanted to build my j2me applications through Eclipse with antenna
    [...]

    I have Eclipse set up for J2ME development here. I wound up
    pretty-much ditching Ant during development. I found Ant
    increased by build times to an unacceptable degree.

    What I wound up doing was running the emulator from the class files
    using a batch file that did preverification first:

    ``Since I was already launching via a batch file, I inserted
    a preverify call there.

    This is slightly inefficient if performing multiple runs -
    but essentially everything now works at a reasonable speed -
    and is fairly neat.

    This method bypasses the need to make a jar file - or to
    insert its length in the JAD file.'' - TT.

    I still have an Ant task that bundles things into a Jar for deployment -
    but I used http://ant4me.sourceforge.net/ - rather than
    http://antenna.sourceforge.net/.

    "Preverification failed" may be an indication that you are using a
    non-J2ME API.

    There should be a proper error message somewhere if so - perhaps preverify
    manually to uncover it.

    Here are my original instructions for launching via a batch file:

    ``I found out how to run midlets in Eclipse under windows.

    Other folk seem to:

    * Use the WTK KToolbar, or:
    * Use WSDD.

    The trick is much the same as the one used for the MS JVM:

    You set up a second "Installed JRE" - using the preferences - and have
    it point to an installed JRE.

    Then in the "bin" directory of that you make a batch file - called:

    midp_emulator.bat

    This contains one line:

    C:\Program1\Java\WTK20\bin\emulator %6 %7 %8

    Then you use a run configuration, set it to use the new JRE,
    use these as your "Program arguments":

    -classpath C:\Docs\Java\xyz.jar -Xdescriptor:C:\Docs\Java\xyz.jad

    ...and...

    "midp_emulator.bat"

    ...as your Java executable. The "Main class" can be set to anything.

    That's all.''
    --
    __________
    |im |yler http://timtyler.org/
     
    Tim Tyler, Aug 20, 2003
    #2
    1. Advertising

  3. Scorpion

    Scorpion Guest

    Tim Tyler wrote:
    > Scorpion <> wrote:
    >
    > : I wanted to build my j2me applications through Eclipse with antenna
    > [...]
    >
    > I have Eclipse set up for J2ME development here. I wound up
    > pretty-much ditching Ant during development. I found Ant
    > increased by build times to an unacceptable degree.
    >
    > What I wound up doing was running the emulator from the class files
    > using a batch file that did preverification first:
    >
    > ``Since I was already launching via a batch file, I inserted
    > a preverify call there.
    >
    > This is slightly inefficient if performing multiple runs -
    > but essentially everything now works at a reasonable speed -
    > and is fairly neat.
    >
    > This method bypasses the need to make a jar file - or to
    > insert its length in the JAD file.'' - TT.
    >
    > I still have an Ant task that bundles things into a Jar for deployment -
    > but I used http://ant4me.sourceforge.net/ - rather than
    > http://antenna.sourceforge.net/.
    >
    > "Preverification failed" may be an indication that you are using a
    > non-J2ME API.
    >
    > There should be a proper error message somewhere if so - perhaps preverify
    > manually to uncover it.
    >
    > Here are my original instructions for launching via a batch file:
    >
    > ``I found out how to run midlets in Eclipse under windows.
    >
    > Other folk seem to:
    >
    > * Use the WTK KToolbar, or:
    > * Use WSDD.
    >
    > The trick is much the same as the one used for the MS JVM:
    >
    > You set up a second "Installed JRE" - using the preferences - and have
    > it point to an installed JRE.
    >
    > Then in the "bin" directory of that you make a batch file - called:
    >
    > midp_emulator.bat
    >
    > This contains one line:
    >
    > C:\Program1\Java\WTK20\bin\emulator %6 %7 %8
    >
    > Then you use a run configuration, set it to use the new JRE,
    > use these as your "Program arguments":
    >
    > -classpath C:\Docs\Java\xyz.jar -Xdescriptor:C:\Docs\Java\xyz.jad
    >
    > ...and...
    >
    > "midp_emulator.bat"
    >
    > ...as your Java executable. The "Main class" can be set to anything.
    >
    > That's all.''


    Thanks for your suggestions, i'll try the batch thing out, i have a good
    feeling about it :)

    I've done manual preverify'ing on the jar file, and on the seperate
    class files, but both give no trouble. That's why i find it so strange
    that antenna *does* return an error.

    Thanks again, i'll try it out!
     
    Scorpion, Aug 20, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. robin
    Replies:
    0
    Views:
    894
    robin
    Jul 20, 2003
  2. Michael Winter

    Antenna Web Design Studio

    Michael Winter, Oct 21, 2005, in forum: HTML
    Replies:
    11
    Views:
    723
    dorayme
    Oct 25, 2005
  3. David N. Welton

    Future of antenna for j2me?

    David N. Welton, May 7, 2006, in forum: Java
    Replies:
    1
    Views:
    410
    Darryl L. Pierce
    May 12, 2006
  4. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

    leader-alignment="reference-area" problem under Antenna House XSF V3.4

    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, May 24, 2006, in forum: XML
    Replies:
    0
    Views:
    472
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    May 24, 2006
  5. Replies:
    9
    Views:
    909
    Darryl L. Pierce
    Jul 2, 2006
Loading...

Share This Page