Eclipse and J2ME support through antenna

S

Scorpion

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)

----------------
 
T

Tim Tyler

: 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.''
 
S

Scorpion

Tim said:
: 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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top