Unable to connect to j2me device emulator

2019-07-04 11:17发布

问题:

I am having trouble in testing a Midlet. I am using j2me sdk 3, the Midlet builds successfully, but when i try to run it, it fails and it shows the following message in the log:

Failed to connect to device {0}!
Reason:
Emulator {0} terminated while waiting for it to register!

回答1:

I had the same problem. On the next system restart there where message about runMidlet crash due to DEP (Data Execution Prevention).

After turning off DEP all started to work perfect.

In case it could help, it was on Win2003, Java ME SDK 3.0.

UPDATE: I advise to turn off DEP for all programs (it is "Turn on DEP for essential Windows programs and services only" option). In my case turning off DEP for single runMidlet.exe had only temporary effect.

See also Java ME SDK Team blog entry on this



回答2:

You probably need to increase the debugger timeout value. I work in WTK 2.5.x so I'm not sure where this setting is exposed (are you on Netbeans?) in version 3.0.

Somewhat out-of-date instructions for Eclipse and Netbeans.



回答3:

Just go to tools/java platform, select the CLDC Framework blah blah blah and Click refresh.



回答4:

If you are using Linux as your operating system just you need to type the command 'setenforce permissive' in the terminal.It will solve the issue. Rishabh



回答5:

Aside from the DEP issue mentioned in other answers, there is a useful list of solutions to common problems here.



标签: java-me