帮我解决j2me-polish中的问题

发布于 2024-11-27 14:43:11 字数 20106 浏览 2 评论 0原文

我是一名 j2me 程序员。我不知道 j2me-polish。 我在 j2me 中开发了一个应用程序,它使用 FileConnection API (jsr75.jar) 和蓝牙 (jsr082.jar)。j2me 项目工作正常。

但我将其转换为 j2me Polish 然后它会导致一些错误。 对于这两个我都使用 eclipse ide。

我创建了一个新的j2me-polish项目。然后我将j2me项目的src文件夹中的文件复制到j2me-polish项目的“source/src”文件夹中。 然后我选择我的j2me-polish项目,右键单击它,然后选择“属性”,然后选择“java构建路径”,我添加诸如“btapi.jar”之类的jar(\ J2ME-Polish \ import \ btapi .jar)和“pdapi.jar”(\J2ME-Polish\import\pdapi.jar)。

然后我运行 j2me-polish 应用程序。 出现以下错误,

Buildfile: C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build.xml

test:

init:

j2mepolish:   [j2mepolish] info: the license attribute is no longer supported. Please place your license.key file either to ${project.home} or to ${polish.home}.   [j2mepolish] J2ME Polish
2.0-RC4 (GPL License)   [j2mepolish] Loading device database...   [j2mepolish] Using locale [en_US]...   [j2mepolish] assembling resources for device [Generic/DefaultColorPhone].   [j2mepolish] preprocessing for device [Generic/DefaultColorPhone].   [j2mepolish] Warning: CSS-Style [focused] not found, now using the default style instead. If you use Forms or Lists, you should define the style [focused].   [j2mepolish] Warning: CSS style [title] not found, you should define it for designing the titles of screens.   [j2mepolish] processing locale code...    [j2mepolish] Warning: unable to resolve path to API "mmapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "wmapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "pdaapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "jtwi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] compiling for device [Generic/DefaultColorPhone]. [j2mepolish-javac-Generic/DefaultColorPhone] Compiling 227 source files to C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\classes
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:15: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.BluetoothConnectionException;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:16: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DeviceClass;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:17: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DiscoveryAgent;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:18: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DiscoveryListener;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:19: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.LocalDevice;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:20: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.RemoteDevice;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:21: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.ServiceRecord;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:22: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.UUID;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:28: cannot find symbol
       [javac] symbol: class DiscoveryListener
       [javac] public class BluetoothHandler implements DiscoveryListener {
       [javac]                                          ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:37: cannot find symbol
       [javac] symbol  : class LocalDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private LocalDevice local = null;
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:38: cannot find symbol
       [javac] symbol  : class DiscoveryAgent
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private static DiscoveryAgent agent = null;
       [javac]                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:55: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private RemoteDevice devic = null;
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:170: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void deviceDiscovered(RemoteDevice device, DeviceClass dclass) {
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:170: cannot find symbol
       [javac] symbol  : class DeviceClass
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void deviceDiscovered(RemoteDevice device, DeviceClass dclass) {
       [javac]                                                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:257: cannot find symbol
       [javac] symbol  : class ServiceRecord
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void servicesDiscovered(int transID, ServiceRecord[] serviceRecord) {
       [javac]                                                 ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:443: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private void doServiceSearch(RemoteDevice device) {
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:11: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:12: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:34: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:35: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileSystemRegistry;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:199: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_COMPLETED:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:230: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_ERROR:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:241: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_TERMINATED:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:261: cannot find symbol
       [javac] symbol  : variable ServiceRecord
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                         ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:285: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_ERROR
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_ERROR) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:296: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_COMPLETED
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_COMPLETED) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:330: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_TERMINATED
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_TERMINATED) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:375: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_NO_RECORDS
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_NO_RECORDS) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:385: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_DEVICE_NOT_REACHABLE
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_DEVICE_NOT_REACHABLE) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:411: cannot find symbol
       [javac] symbol  : variable LocalDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             local = LocalDevice.getLocalDevice();
       [javac]                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:428: cannot find symbol
       [javac] symbol  : variable DiscoveryAgent
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             if (!agent.startInquiry(DiscoveryAgent.GIAC, this)) {
       [javac]                                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:445: cannot find symbol
       [javac] symbol  : class UUID
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             agent.searchServices(null, new UUID[]{new UUID(0x1101)}, device,
       [javac]                                            ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:445: cannot find symbol
       [javac] symbol  : class UUID
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             agent.searchServices(null, new UUID[]{new UUID(0x1101)}, device,
       [javac]                                                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:480: cannot find symbol
       [javac] symbol  : class BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             } catch (BluetoothConnectionException bce) {
       [javac]                      ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:482: cannot find symbol
       [javac] symbol  : variable BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                 if (bce.getStatus() == BluetoothConnectionException.TIMEOUT) {
       [javac]                                        ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:531: cannot find symbol
       [javac] symbol  : class BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                 } catch (BluetoothConnectionException bce) {
       [javac]                          ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:538: cannot find symbol
       [javac] symbol  : variable BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                     if (bce.getStatus() != BluetoothConnectionException.TIMEOUT) {
       [javac]                                            ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:31: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.Log
       [javac]             FileConnection file = (FileConnection) Connector.open(fileName);
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:31: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.Log
       [javac]             FileConnection file = (FileConnection) Connector.open(fileName);
       [javac]                                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:112: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.PrinterCommands
       [javac]         FileConnection file = null;
       [javac]         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:116: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.PrinterCommands
       [javac]             file = (FileConnection) Connector.open(LOGO_PATH + logoName
       [javac]                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:125: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]      FileConnection connection = null;
       [javac]      ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:130: cannot find symbol
       [javac] symbol  : variable FileSystemRegistry
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]          Enumeration enumeration = FileSystemRegistry.listRoots();
       [javac]                                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:153: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]              connection = (FileConnection) Connector.open( url, Connector.READ_WRITE );
       [javac]                            ^
       [javac] 44 errors
       [javac] An internal class of J2ME Polish could not be compiled. Please try a clean rebuild by either calling "ant clean j2mepolish" or by removing the working directory "C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test".
       [javac] When an API-class was not found, you might need to define where to find the device-APIs. Following classpath has been used: [C:\Users\sivakumar.j1\J2ME-Polish\import\midp-2.0.jar;C:\Users\sivakumar.j1\J2ME-Polish\import\cldc-1.1.jar;]. BUILD FAILED C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build.xml:114: Unable to compile source code for device [Generic/DefaultColorPhone]: Compile failed; see the compiler error output for details. Total time: Total Time: 7 seconds

我不知道如何解决问题。请帮我解决问题。

谢谢&问候,

Im a j2me programmer.I does not know j2me-polish.
I develop an application in j2me which is using the FileConnection API (jsr75.jar) and the Bluetooth (jsr082.jar).The j2me project works correctly.

But i converted that into j2me polish then it cause some error.
For both im using eclipse ide.

I created a new j2me-polish project.Then i copy the files in the src folder of the j2me projecct into the "source/src" folder of j2me-polish project.
Then i select the my j2me-polish project,right click it,then i select "properties" then i select "java build path",the i add the jars such as "btapi.jar" (\J2ME-Polish\import\btapi.jar) and "pdapi.jar" (\J2ME-Polish\import\pdapi.jar).

Then i run the j2me-polish application .
The the following errors is arised,

Buildfile: C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build.xml

test:

init:

j2mepolish:   [j2mepolish] info: the license attribute is no longer supported. Please place your license.key file either to ${project.home} or to ${polish.home}.   [j2mepolish] J2ME Polish
2.0-RC4 (GPL License)   [j2mepolish] Loading device database...   [j2mepolish] Using locale [en_US]...   [j2mepolish] assembling resources for device [Generic/DefaultColorPhone].   [j2mepolish] preprocessing for device [Generic/DefaultColorPhone].   [j2mepolish] Warning: CSS-Style [focused] not found, now using the default style instead. If you use Forms or Lists, you should define the style [focused].   [j2mepolish] Warning: CSS style [title] not found, you should define it for designing the titles of screens.   [j2mepolish] processing locale code...    [j2mepolish] Warning: unable to resolve path to API "mmapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "wmapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "pdaapi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] Warning: unable to resolve path to API "jtwi". When this leads to problems, please register this API in [apis.xml].   [j2mepolish] compiling for device [Generic/DefaultColorPhone]. [j2mepolish-javac-Generic/DefaultColorPhone] Compiling 227 source files to C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\classes
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:15: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.BluetoothConnectionException;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:16: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DeviceClass;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:17: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DiscoveryAgent;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:18: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.DiscoveryListener;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:19: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.LocalDevice;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:20: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.RemoteDevice;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:21: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.ServiceRecord;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:22: package javax.bluetooth does not exist
       [javac] import javax.bluetooth.UUID;
       [javac]                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:28: cannot find symbol
       [javac] symbol: class DiscoveryListener
       [javac] public class BluetoothHandler implements DiscoveryListener {
       [javac]                                          ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:37: cannot find symbol
       [javac] symbol  : class LocalDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private LocalDevice local = null;
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:38: cannot find symbol
       [javac] symbol  : class DiscoveryAgent
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private static DiscoveryAgent agent = null;
       [javac]                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:55: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private RemoteDevice devic = null;
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:170: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void deviceDiscovered(RemoteDevice device, DeviceClass dclass) {
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:170: cannot find symbol
       [javac] symbol  : class DeviceClass
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void deviceDiscovered(RemoteDevice device, DeviceClass dclass) {
       [javac]                                                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:257: cannot find symbol
       [javac] symbol  : class ServiceRecord
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     public void servicesDiscovered(int transID, ServiceRecord[] serviceRecord) {
       [javac]                                                 ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:443: cannot find symbol
       [javac] symbol  : class RemoteDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]     private void doServiceSearch(RemoteDevice device) {
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:11: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:12: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:34: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileConnection;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:35: package javax.microedition.io.file does not exist
       [javac] import javax.microedition.io.file.FileSystemRegistry;
       [javac]                                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:199: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_COMPLETED:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:230: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_ERROR:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:241: cannot find symbol
       [javac] symbol  : variable DiscoveryListener
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             case DiscoveryListener.INQUIRY_TERMINATED:
       [javac]                  ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:261: cannot find symbol
       [javac] symbol  : variable ServiceRecord
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                         ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:285: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_ERROR
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_ERROR) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:296: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_COMPLETED
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_COMPLETED) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:330: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_TERMINATED
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_TERMINATED) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:375: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_NO_RECORDS
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_NO_RECORDS) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:385: cannot find symbol
       [javac] symbol  : variable SERVICE_SEARCH_DEVICE_NOT_REACHABLE
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]         if (respCode == SERVICE_SEARCH_DEVICE_NOT_REACHABLE) {
       [javac]                         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:411: cannot find symbol
       [javac] symbol  : variable LocalDevice
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             local = LocalDevice.getLocalDevice();
       [javac]                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:428: cannot find symbol
       [javac] symbol  : variable DiscoveryAgent
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             if (!agent.startInquiry(DiscoveryAgent.GIAC, this)) {
       [javac]                                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:445: cannot find symbol
       [javac] symbol  : class UUID
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             agent.searchServices(null, new UUID[]{new UUID(0x1101)}, device,
       [javac]                                            ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:445: cannot find symbol
       [javac] symbol  : class UUID
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             agent.searchServices(null, new UUID[]{new UUID(0x1101)}, device,
       [javac]                                                       ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:480: cannot find symbol
       [javac] symbol  : class BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]             } catch (BluetoothConnectionException bce) {
       [javac]                      ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:482: cannot find symbol
       [javac] symbol  : variable BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                 if (bce.getStatus() == BluetoothConnectionException.TIMEOUT) {
       [javac]                                        ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:531: cannot find symbol
       [javac] symbol  : class BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                 } catch (BluetoothConnectionException bce) {
       [javac]                          ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\BluetoothHandler.java:538: cannot find symbol
       [javac] symbol  : variable BluetoothConnectionException
       [javac] location: class com.evolute.mbs.BluetoothHandler
       [javac]                     if (bce.getStatus() != BluetoothConnectionException.TIMEOUT) {
       [javac]                                            ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:31: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.Log
       [javac]             FileConnection file = (FileConnection) Connector.open(fileName);
       [javac]             ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\Log.java:31: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.Log
       [javac]             FileConnection file = (FileConnection) Connector.open(fileName);
       [javac]                                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:112: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.PrinterCommands
       [javac]         FileConnection file = null;
       [javac]         ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\com\evolute\mbs\PrinterCommands.java:116: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class com.evolute.mbs.PrinterCommands
       [javac]             file = (FileConnection) Connector.open(LOGO_PATH + logoName
       [javac]                     ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:125: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]      FileConnection connection = null;
       [javac]      ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:130: cannot find symbol
       [javac] symbol  : variable FileSystemRegistry
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]          Enumeration enumeration = FileSystemRegistry.listRoots();
       [javac]                                    ^
       [javac] C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test\Generic\DefaultColorPhone\en_US\source\de\enough\polish\log\file\FileLogHandler.java:153: cannot find symbol
       [javac] symbol  : class FileConnection
       [javac] location: class de.enough.polish.log.file.FileLogHandler
       [javac]              connection = (FileConnection) Connector.open( url, Connector.READ_WRITE );
       [javac]                            ^
       [javac] 44 errors
       [javac] An internal class of J2ME Polish could not be compiled. Please try a clean rebuild by either calling "ant clean j2mepolish" or by removing the working directory "C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build\test".
       [javac] When an API-class was not found, you might need to define where to find the device-APIs. Following classpath has been used: [C:\Users\sivakumar.j1\J2ME-Polish\import\midp-2.0.jar;C:\Users\sivakumar.j1\J2ME-Polish\import\cldc-1.1.jar;]. BUILD FAILED C:\Users\sivakumar.j1\j2me_polish_workspace\transactionApp1\build.xml:114: Unable to compile source code for device [Generic/DefaultColorPhone]: Compile failed; see the compiler error output for details. Total time: Total Time: 7 seconds

I does not know how to solve the issues.Please help me to solve the issues.

Thanks & Regards,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里兽 2024-12-04 14:43:11

我收到类似的错误。但是我复制 device.xml 中的“通用默认彩色手机”设置并将其附加到它旁边。更改名称并在功能中添加“btapi”,因此添加了新的自定义设备。然后我创建一个项目并将设备设置为新设备。然后就可以正常工作了。

I get the similar error.But i copy the "Generic default color phone" setting in device.xml and append it next to it.Change the name and add the "btapi" in the capability,Hence new custom device is added.Then i create a project and set the device as the new device.Then it will works fine.

流年里的时光 2024-12-04 14:43:11

我在使用 Java ME SDK 3.0 时遇到了同样的问题。这取决于您在项目中选择的设备支持哪些软件包。

该解决方案有效:

  1. 打开项目的属性。
  2. 转到“平台”部分,
  3. 将设备更改为任何设备,例如“DefaultCldcPhone1”。请不要“DefaultCldcJtw...”。

现在,在同一窗口的可选包列表中,您可以看到更多包以及“文件连接和 PIM 可选包 1.0”。祝你好运。

I had the same problem with Java ME SDK 3.0. It's a matter of which packages your selected device in the project supports.

This solution worked:

  1. Open the properties of the project.
  2. Go to the "Platform" section
  3. Change the device to any device, for example "DefaultCldcPhone1". Please, NOT "DefauldCldcJtw...".

Now, in the list of optional package in the same window, you see more packages and also the "File Connection and PIM optional packages 1.0". Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文