Skip to main content

Running MIDlets on pMEA without jump?

5 replies [Last post]
max_mu
Offline
Joined: 2006-11-15
Points: 0

Hi,
I've ported pMEF and now turn to pMEA. I did it with USE_MIDP=true but USE_JUMP=false, and without PBP, how can I run a MIDlet then? And, do I have to reimplement javacalls to make them reentry-able?

Thanks,
M@x

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi,
> I've ported pMEF and now turn to pMEA. I did it with USE_MIDP=true
> but USE_JUMP=false, and without PBP, how can I run a MIDlet then?
> And, do I have to reimplement javacalls to make them reentry-able?

Hi Max,

Was your build successful with USE_MIDP=true and USE_JUMP=false? Did
you get a cvm binary in the bin directory after your build? If so, you
do not have to reimplement the javacalls.

If you have a clean build, which platform did you build for? I'm
assuming win32-arm-wm5.

If that's true, to run a MIDlet follow the instructions at:

http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedGSGWinMob...

Here are the important steps to run a MIDLet:

# Two files are needed in addition to the CDC Java runtime environment
executable files.

* A .lnk file launches the CDC Java runtime environment. Note that
paths used in the .lnk file must be relative to the Storage Card root.

* An args.txt to contain the arguments for cvm.exe.

For example, here is a basic test-fp.lnk file to launch cvm and run the
HelloWorld application:

test-fp.lnk
---
01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"

The fpargs.txt file should contain the following:

args.txt
---
-Xmx2m -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld

# Navigate to the File Explorer application and select the Storage Card.

# Launch the HelloWorld application by clicking on the test-fp list item.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

max_mu
Offline
Joined: 2006-11-15
Points: 0

Hi Hinkmond,
Thanks a lot for your quick response. However, my case is a bit complecated.
It's not a WinCE or Linux porting. I'm now trying to port pMEA to PSP, a whole new platform. I just link CDC and MIDP object files into a lib (cvm.lib) and link it with other libs like pcsl_xxx and javacall, and then PSP platform libs. The final result should be an elf file, but I need to rewrite a new entry function ( e.g main() )to startup CVM and launch a MIDlet. That's my question "How to run MIDlet" actually. Or say, I want to know how to implement a new entry point to run MIDlet on CVM. I'll be very appreaciate for any suggestion.

Thanks,
M@x

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi Hinkmond,
> Thanks a lot for your quick response. However, my case is a bit complecated.
> It's not a WinCE or Linux porting. I'm now trying to port pMEA to PSP, a whole new platform. I just link CDC and MIDP object files into a lib (cvm.lib) and link it with other libs like pcsl_xxx and javacall, and then PSP platform libs. The final result should be an elf file, but I need to rewrite a new entry function ( e.g main() )to startup CVM and launch a MIDlet. That's my question "How to run MIDlet" actually. Or say, I want to know how to implement a new entry point to run MIDlet on CVM. I'll be very appreaciate for any suggestion.
>

Hi Max,

That's a tough one. I would suggest you look first at how to call
JNI_CreateJavaVM as an entry point.

See:

cdc/src/share/javavm/runtime/jni_impl.c

Then, from that you should investigate how to use the MIDP component's
com.sun.midp.main.CdcMIDletSuiteLoader.

Ex. VM start-up args to pass to JNI_CreateJavaVM()

-Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp
-Dsun.midp.home.path=/midp/midp_wince
-Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader
sun.misc.MIDPLauncher -midppath /midp/midp_wince/classes -suitepath
/HelloWorld.jar -1 HelloWorld

For info on the CdcMIDletSuiteLoader class and how it works, see:

midp/src/ams/cdc_application/classes/com/sun/midp/main/CdcMIDletSuiteLoader.java

It's not straight-forward. But, I hope this helps you get started.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

max_mu
Offline
Joined: 2006-11-15
Points: 0

Thanks Hinkmond! That's very helpful for starting up my work.

M@x

Gary Adams

The key to MIDP/CDC w/o JUMP stack is that there is no AMS
available. There should be scripts in midp/
/bin//
that are used for debugging purposes on non-AMS builds.
They are used for testing on new platforms to manually
install, run, remove and list MIDlets.

phonemeadvanced@mobileandembedded.org wrote:
> Thanks Hinkmond! That's very helpful for starting up my work.
>
> M@x
> [Message sent by forum member 'max_mu' (max_mu)]
>
> http://forums.java.net/jive/thread.jspa?messageID=260609
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net