Skip to Main Content

Embedded Technologies

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do you start the Java ME 8.2 Emulator on Linux?

1b492ccd-b4ec-47b4-81a7-98b81f128396Feb 9 2016 — edited Feb 28 2016

I just found your forum after I already posted my question to StackOverflow.  I think I may get a better response here, though.

Below is the content from that post, but first I'll explain my problem in a little more context.  I'm trying to simply start the Java ME 8.2 Emulator from the linux command line.  I also installed the Eclipse Java ME 8.2 plugins, created a project, etc.  I'm able to use the Java ME SDK 8.2 to create a MIDlet, compile my project, etc... it can seed all the default CLDC/MEEP Emulated Device configurations through eclipse.  I just can't start the emulator from the command line, nor from eclipse.   I'm eventually going to target a raspberry pi 2, but right now I just want to prove out a hello-world through the emulator.

The error is:

$> emulator -Xjam -Xdevice:EmbeddedDevice1

*** Error ***

Failed to connect to device 0!

Reason:

Emulator 0 terminated while waiting for it to register!

Here is the content of my cross-posted question:

I just downloaded and installed the Java ME platform SDK 8.2. I'm trying to start the emulator and it won't run. The error is:

Java_ME_platform_SDK_8.2/bin $> emulator -Xjam -Xdevice:EmbeddedDevice1 

*** Error ***

Failed to connect to device 0!

Reason:

Emulator 0 terminated while waiting for it to register!

I'm running on

Linux 2.6.32-504.23.4.el6.x86_64 #1 SMP x86_64 GNU/Linux CentOS release 6.6 (Final)

I'm trying to follow Oracle's Using the Emulator guide, and it doesn't look like it should be difficult. It looks like should just install the SDK, then run the emulator as I did... it just doesn't work.

I also did the following:

  • turned off my firewall
  • verified nothing was running on port 1299
  • verified my device-manager.object-registry.host=127.0.0.1
  • put the Java_ME_platform_SDK_8.2/bin directory at the beginning of my path
  • set JAVA_HOME to my javamesdk_installdir

The Device Selector UI and the Device Connections Manager UI both start without a problem, and I'm able to see the pre-configured devices, like EmbeddedDevice1.

I also have a plain Java SDK installed on the machine

java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Thanks!!

-John

Comments

Your Linux is 64-bit, Java ME VM is 32-bit application, so 32-bit support libraries have to be installed before you can use ME SDK. This is actually described in docs: https://docs.oracle.com/javame/8.2/sdk-dev-guide/install.htm#sthref10

Docs has an example how to do it under Ubuntu, but under CentOS this also should not be a problem.

Please, also, note that CentOS is not officially supported platform.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 27 2016
Added on Feb 9 2016
1 comment
1,752 views