How to convert j2me project into android with j2me source code

300 views
Skip to first unread message

tim

unread,
Mar 15, 2011, 6:12:31 AM3/15/11
to microemulator-support
dear all,

I have problems after converting the jar into apk successfully, when I
run the apk, it always alerts "stopped unexpectedly"
So I am wondering if I can compile the project with my own j2me source
code.
Or anyone can help me find out why my apk always fails?

thanks

Bartek Teodorczyk

unread,
Mar 15, 2011, 6:17:50 AM3/15/11
to microemula...@googlegroups.com, tim
Hi,

Provide more details from the logcat console:
http://developer.android.com/guide/developing/tools/logcat.html

BR,
Bartek Teodorczyk

> --
> You received this message because you are subscribed to the Google Groups "microemulator-support" group.
> To post to this group, send email to microemula...@googlegroups.com.
> To unsubscribe from this group, send email to microemulator-su...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/microemulator-support?hl=en.
>
>

TingLi Wang

unread,
Mar 15, 2011, 6:30:53 AM3/15/11
to Bartek Teodorczyk, microemula...@googlegroups.com
here's my log from logcat after running my app on emulator
my java app is workable on j2me handset.

I/ActivityManager(   50): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.microemu.android.GameMain/org.microemu.android.MicroEmulator }

I/ActivityManager(   50): Start proc org.microemu.android.GameMain for activity org.microemu.android.GameMain/org.microemu.android.MicroEmulator: pid=209 uid=10026 gids={3003}

I/jdwp    (  209): received file descriptor 20 from ADB

D/ddm-heap(  209): Got feature list request

V/MicroEmulator(  209): implementation registered [org.microemu.cldc.file.FileSystem]

V/MicroEmulator(  209):  

I/dalvikvm(  209): Failed resolving Lh; interface 344 'Ljavax/microedition/media/PlayerListener;'

W/dalvikvm(  209): Link of class 'Lh;' failed

I/dalvikvm(  209): Failed resolving Lh; interface 344 'Ljavax/microedition/media/PlayerListener;'

W/dalvikvm(  209): Link of class 'Lh;' failed

W/dalvikvm(  209): VFY: unable to resolve instance field 164

W/dalvikvm(  209): VFY:  rejecting opcode 0x54 at 0x0004

W/dalvikvm(  209): VFY:  rejected LGameMain;.a ()V

W/dalvikvm(  209): Verifier rejected class LGameMain;

W/dalvikvm(  209): Class init failed in newInstance call (LGameMain;)

V/MicroEmulator(  209): error Message: Error starting MIDlet: Unable to create MIDlet, java.lang.VerifyError: GameMain java.lang.VerifyError: GameMain

V/MicroEmulator(  209):  

V/MicroEmulator(  209): java.lang.VerifyError: GameMain

V/MicroEmulator(  209): at java.lang.Class.newInstanceImpl(Native Method)

V/MicroEmulator(  209): at java.lang.Class.newInstance(Class.java:1472)

V/MicroEmulator(  209): at org.microemu.app.Common.loadMidlet(Common.java:418)

V/MicroEmulator(  209): at org.microemu.app.Common.initMIDlet(Common.java:1061)

V/MicroEmulator(  209): at org.microemu.android.MicroEmulator.onCreate(MicroEmulator.java:175)

V/MicroEmulator(  209): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)

V/MicroEmulator(  209): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)

V/MicroEmulator(  209): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)

V/MicroEmulator(  209): at android.app.ActivityThread.access$2100(ActivityThread.java:116)

V/MicroEmulator(  209): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

V/MicroEmulator(  209): at android.os.Handler.dispatchMessage(Handler.java:99)

V/MicroEmulator(  209): at android.os.Looper.loop(Looper.java:123)

V/MicroEmulator(  209): at android.app.ActivityThread.main(ActivityThread.java:4203)

V/MicroEmulator(  209): at java.lang.reflect.Method.invokeNative(Native Method)

V/MicroEmulator(  209): at java.lang.reflect.Method.invoke(Method.java:521)

V/MicroEmulator(  209): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)

V/MicroEmulator(  209): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)

V/MicroEmulator(  209): at dalvik.system.NativeStart.main(Native Method)

V/MicroEmulator(  209): destroyMIDletContext

V/MicroEmulator(  209):  

Bartek Teodorczyk

unread,
Mar 15, 2011, 6:33:28 AM3/15/11
to TingLi Wang, microemula...@googlegroups.com
Hi,

You are trying to use JSR-135 (Multimedia API) which is not a part of
open source MicroEmulator project (access to the PlayerListener
class). For the comercial version that includes the JSR-135
implementation, please contact the email in...@microemu.com

BR,
Bartek Teodorczyk

Rochmat Mustopa

unread,
Apr 27, 2011, 3:15:52 AM4/27/11
to microemulator-support
hi Bartek,

i have same problem "stopped unexpectedly" , the emulator can't find
MIDlet class.

this my logcat

I/ActivityManager( 51): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.microem
u.android.mobile.wallet.FinnetMC/org.microemu.android.MicroEmulator }
I/ActivityManager( 51): Start proc
org.microemu.android.mobile.wallet.FinnetMC for activity
org.microemu.android.mobile.wallet.FinnetMC/org.microemu.and
roid.MicroEmulator: pid=221 uid=10026 gids={3003}
V/MicroEmulator( 221): implementation registered
[org.microemu.cldc.file.FileSystem]
V/MicroEmulator( 221):
I/dalvikvm( 221): Failed resolving Lmobile/wallet/FinnetMC; interface
417 'Ljavax/wireless/messaging/MessageListener;'
W/dalvikvm( 221): Link of class 'Lmobile/wallet/FinnetMC;' failed
V/MicroEmulator( 221): error Message: Error: Unable to find MIDlet
class, java.lang.ClassNotFoundException: mobile.wallet.FinnetMC in
loader dalvik.syste
m.PathClassLoader@43d0b5c8 java.lang.ClassNotFoundException:
mobile.wallet.FinnetMC in loader
dalvik.system.PathClassLoader@43d0b5c8
V/MicroEmulator( 221):
V/MicroEmulator( 221): java.lang.ClassNotFoundException:
mobile.wallet.FinnetMC in loader
dalvik.system.PathClassLoader@43d0b5c8
V/MicroEmulator( 221): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
V/MicroEmulator( 221): at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
V/MicroEmulator( 221): at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
V/MicroEmulator( 221): at
org.microemu.app.Common.initMIDlet(Common.java:1015)
V/MicroEmulator( 221): at
org.microemu.android.MicroEmulator.onCreate(MicroEmulator.java:175)
V/MicroEmulator( 221): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
V/MicroEmulator( 221): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)
V/MicroEmulator( 221): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)
V/MicroEmulator( 221): at android.app.ActivityThread.access
$2200(ActivityThread.java:119)
V/MicroEmulator( 221): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1863)
V/MicroEmulator( 221): at
android.os.Handler.dispatchMessage(Handler.java:99)
V/MicroEmulator( 221): at android.os.Looper.loop(Looper.java:
123)
V/MicroEmulator( 221): at
android.app.ActivityThread.main(ActivityThread.java:4363)
V/MicroEmulator( 221): at
java.lang.reflect.Method.invokeNative(Native Method)
V/MicroEmulator( 221): at
java.lang.reflect.Method.invoke(Method.java:521)
V/MicroEmulator( 221): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
V/MicroEmulator( 221): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
V/MicroEmulator( 221): at
dalvik.system.NativeStart.main(Native Method)
W/dalvikvm( 221): threadid=17: thread exiting with uncaught exception
(group=0x4001b188)
E/AndroidRuntime( 221): Uncaught handler: thread Thread-9 exiting due
to uncaught exception
E/AndroidRuntime( 221): java.lang.NullPointerException
E/AndroidRuntime( 221): at
org.microemu.MIDletBridge.getMIDletAccess(MIDletBridge.java:119)
E/AndroidRuntime( 221): at org.microemu.android.MicroEmulator
$3.run(MicroEmulator.java:203)
E/AndroidRuntime( 221): at java.lang.Thread.run(Thread.java:
1096)
I/Process ( 51): Sending signal. PID: 221 SIG: 3
I/dalvikvm( 221): threadid=7: reacting to signal 3
I/dalvikvm( 221): Wrote stack trace to '/data/anr/traces.txt'
I/ActivityManager( 51): Displayed activity
org.microemu.android.mobile.wallet.FinnetMC/
org.microemu.android.MicroEmulator: 4512 ms (total 4512 ms)
I/Process ( 221): Sending signal. PID: 221 SIG: 9
I/ActivityManager( 51): Process
org.microemu.android.mobile.wallet.FinnetMC (pid 221) has died.
I/WindowManager( 51): WIN DEATH: Window{43d5c210
org.microemu.android.mobile.wallet.FinnetMC/
org.microemu.android.MicroEmulator paused=false}
I/UsageStats( 51): Unexpected resume of com.android.launcher while
already resumed in org.microemu.android.mobile.wallet.FinnetMC

Bartek Teodorczyk

unread,
Apr 27, 2011, 3:22:19 AM4/27/11
to microemula...@googlegroups.com
Hi,

It seems your application uses JSR-120 (WMA) which is not available by
the open source part of the project. MicroEmu (www.microemu.com)
provides several commercial Android JSR's implementations that
includes the JSR-120.

BR,
Bartek Teodorczyk

Rochmat Mustopa

unread,
Apr 27, 2011, 4:17:16 AM4/27/11
to microemulator-support
i think the problem is here

V/MicroEmulator( 221): error Message: Error: Unable to find MIDlet
class, java.lang.ClassNotFoundException: mobile.wallet.FinnetMC in
loader dalvik.syste
m.PathClassLoader@43d0b5c8 java.lang.ClassNotFoundException:
mobile.wallet.FinnetMC in loader
dalvik.system.PathClassLoader@43d0b5c8
V/MicroEmulator( 221):
V/MicroEmulator( 221): java.lang.ClassNotFoundException:
mobile.wallet.FinnetMC in loader
dalvik.system.PathClassLoader@43d0b5c8

this isn't about JSR but where i have to set the android path ?


On Apr 27, 2:22 pm, Bartek Teodorczyk <bar...@gmail.com> wrote:
> Hi,
>
> It seems your application uses JSR-120 (WMA) which is not available by
> the open source part of the project. MicroEmu (www.microemu.com)
> provides several commercial Android JSR's implementations that
> includes the JSR-120.
>
> BR,
> Bartek Teodorczyk
>
> On Wed, Apr 27, 2011 at 9:15 AM, Rochmat Mustopa
>

Bartek Teodorczyk

unread,
Apr 27, 2011, 4:19:42 AM4/27/11
to microemula...@googlegroups.com
Hi,

The real problem is in missing MessageListener class which is part of JSR-120.

V/MicroEmulator( 221):
I/dalvikvm( 221): Failed resolving Lmobile/wallet/FinnetMC; interface
417 'Ljavax/wireless/messaging/MessageListener;'
W/dalvikvm( 221): Link of class 'Lmobile/wallet/FinnetMC;' failed
V/MicroEmulator( 221): error Message: Error: Unable to find MIDlet
class, java.lang.ClassNotFoundException: mobile.wallet.FinnetMC in
loader dalvik.syste
m.PathClassLoader@43d0b5c8 java.lang.ClassNotFoundException:
mobile.wallet.FinnetMC in loader
dalvik.system.PathClassLoader@43d0b5c8

BR,
Bartek Teodorczyk

Reply all
Reply to author
Forward
0 new messages