Donate Share

MicroEmulator

Tracker: Bugs

5 jad file attributes are not read when running using Main - ID: 1676928
Last Update: Settings changed ( barteo )

I'm running my MIDlet using the main class in the swing app. I have a bunch
of properties in the jad file that I need to read in; unfortunately there
is no way I can read that in because for a given main class, microemu
ignores the jad file.

The only way I can get it to work is by specifying the jad file first
(mainClass is null, so it reads the jad file and loads the properties) and
then supplying the main class which actually gets run.

The fix here is to fixup the handling of startup arguments, I'm working on
the patch, but have had various issues getting maven2 and eclipse to like
each other.


Nobody/Anonymous ( nobody ) - 2007-03-09 02:13

5

Closed

Fixed

Nobody/Anonymous

App Swing

Target: 2.0.1

Public


Comments ( 6 )




Date: 2007-03-19 16:07
Sender: barteoProject AdminAccepting Donations


Fixed by adding new paremeter --propertiesjad {jad url/file}. Please
verify.


Date: 2007-03-11 00:25
Sender: radoshi


Thanks Bartek. If you don't get around to it, I'll fix it at some point
and send you guys a patch. The -jad is perhaps not the greatest option name
:)

-Rushabh


Date: 2007-03-10 15:03
Sender: barteoProject AdminAccepting Donations


Your explanation sounds very reasonable. I'll try to fix this problem. The
only thing which I have to think over is name of parameter (you proposed
-jad) while specifying jad file to read only properties.


Date: 2007-03-09 17:03
Sender: radoshi


The fact that it is impossible to read the jad file parameters that way is
a bug, don't you think? It makes it really hard to use microemulator while
developing - my usual compile-build-run cycle is all within eclipse and
microemu works great for that - except for the jad file reading. I cannot
compile to jar everytime and then run it using the jad.

The point that I was trying to make is that right now, there is a bug in
microemu that I can exploit to read in the jad parameters and run with the
main class anyway. And that bug is if I place the jad file as the first
argument (there is no corresponding jar) and then the class to run as the
second. Thus:
My-MIDlet.jad com.bar.foo.MyMIDlet
as arguments within eclipse works; I don't know if you guys intend it to
work this way.

I was proposing making this more explicit and transforming the eclipse /
main class args to something like:
com.bar.foo.MyMIDlet -jad My-MIDlet.jad
where in it reads the jad file properties but executes the MIDlet class.

The whole point of this is to make development easier since I need the jad
file properties during development.


Date: 2007-03-09 15:44
Sender: barteoProject AdminAccepting Donations


As I understood you run the emulator and specify MIDlet class as an
parameter in command line. It is impossible to read jad parameters that
way. Reading the jad parameters only works if you provide jad file/url to
the program.

Example:
java -cp me-app.jar:(your MIDlet jar) org.microemu.app.Main (MIDlet jad
file)


Date: 2007-03-09 02:21
Sender: radoshi


I apologize for not adding a name to this; this bug was submitted by me.


Log in to comment.




Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
status_id Pending 2007-05-05 08:52 barteo
close_date 2007-03-19 16:07 2007-05-05 08:52 barteo
status_id Open 2007-03-19 16:07 barteo
resolution_id None 2007-03-19 16:07 barteo
close_date - 2007-03-19 16:07 barteo
artifact_group_id v2.0.0 2007-03-10 15:03 barteo