我想从 J2ME midlet 调用一个 Servlet,所以我为 Servlet URL 编写了 HTTPConnection 代码来调用 GET 方法。
当 Midlet 套件尝试连接到 Servlet URL 时,我在模拟器中收到以下消息,
{#MyMidlet} Midlet Suite wants to connect to {#Servlet URL} using air time,
this may result in charges, Is it ok to use airtime ?
如果我单击“否”或“是”,则什么都没有发生,它只是被挂起,我使用的是 EclipseME 和 SUN WTK 2.5.2。在控制台中有一个警告,
Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.
这意味着,如果我在单独的线程中创建 HttpConnection,问题会得到解决吗?