java-me

Running application in netbeans results in NoSuchMethodError

独自空忆成欢 提交于 2019-12-01 15:10:51
While I'm running a simple application in my Netbeans 6.9.1,it's showing "task running, click for details" for a long time .and also there is an error "unexpected exception" in the bottom of the netbeans when I'm clicking that: NoSuchMethodError: org.apache.tools.ant.util.FileUtils.getFileUtils()Lorg/apache/tools/ant/util/FileUtils; This error is coming. Few days before this application executed well, but now this error for all applications.The main error is it's not running,but it's showing "running" for a long time.. You should move to the newer or at least stable version of netbeans (from

BlackBerry - waiting screen [closed]

对着背影说爱祢 提交于 2019-12-01 15:10:26
i am developing one application in blackberry java development. I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen. Could you tell me how can i do that.... Regards Pankaj Pareek Basically you need to start the network request in a background thread. Once the network operation is complete you should notify the main/UI thread to change the waiting screen into the results. To notify the main thread have a look at the link below and search for invokeLater : http://developers.sun.com/mobility/midp

How to add external jar or zip file in the Blackberry project

社会主义新天地 提交于 2019-12-01 15:04:44
问题 I want to add a jar file to my BlackBerry project. I have tried adding the jar file by the following manner -> Right click on project -> properties -> Build -> Imported jar files -> Add But after that, whenever I try to run the application I get "Module abc.jar not found error". How do I add a jar file to a BlackBerry project? 回答1: Right click on project->BuildPath->Libraries->Addexternaljar and then press ok it will solved your problem it is for if you are using eclipseplugins.you can see

Sending SMS using Java ME application

隐身守侯 提交于 2019-12-01 14:31:27
I want to a Java ME application that transfers any SMS received to a PC using bluetooth. The PC can then direct the Java ME application via bluetooth to send a response SMS. Is there library available for this architecture or I have to design it myself? Is this approach correct or a better one exists? I want to use bluetooth as then I will not have dependency on the cable. funkybro You'll need to create this yourself, however you'll find that you can't do what you want with J2ME. J2ME can't access any old SMS that the handset receives, only ones sent to a specific port upon which the MIDlet is

SHA-256 hashing function in Java ME/J2ME

最后都变了- 提交于 2019-12-01 14:20:55
I've posted this question on the Nokia Developer forums so please bear with me. I'm writing an app which needs to find the SHA-256 hash of a URL keyed with a unique value – i.e. hmac('sha256', '27/3', '9EWVFmHpHN6n2YKW9QtvUqX3xbsFQUBovlrFddqnF7fpcSDA2q') . What would be the best way to do this in Java ME/J2ME? I've found many examples using the Mac class but this isn't supported in Java ME/J2ME. Thanks in advance. I managed to get things working, the solution is as follows: Digest digest = new SHA256Digest(); HMac hmac = new HMac(digest); hmac.init(new KeyParameter(appKeyHere)); hmac.update

Is there email validator code for Java ME or BlackBerry?

穿精又带淫゛_ 提交于 2019-12-01 14:18:48
Is there some standard email validator code sample for Java ME or BlackBerry? public static boolean validateEmailID(String email) { email = email.trim(); String reverse = new StringBuffer(email).reverse().toString(); if (email == null || email.length() == 0 || email.indexOf("@") == -1) { return false; } int emailLength = email.length(); int atPosition = email.indexOf("@"); int atDot = reverse.indexOf("."); String beforeAt = email.substring(0, atPosition); String afterAt = email.substring(atPosition + 1, emailLength); if (beforeAt.length() == 0 || afterAt.length() == 0) { return false; } for

Asin, Acos, Atan in J2ME

╄→尐↘猪︶ㄣ 提交于 2019-12-01 14:18:04
How could I use Math.asin() (.. etc.) in a J2ME application? (I've looked at Real Java (and it looks like it could do this) but it says I should avoid converting from a string. How could I create a new Real from a double value?) Since MIDP 2.0 this should work: public static double asin(double a) { // -1 < a < 1 // The function isn't very precise final double epsilon=1.0E-7; // Use this to adjust precision double x=a; // Newton's iterative method do x-=(Math.sin(x)-a)/Math.cos(x); while (Math.abs(Math.sin(x)-a)>epsilon); return x; // returned angle is in radians } But hey, that Real - Java

BlackBerry - how to occupy a complete button with image

点点圈 提交于 2019-12-01 14:11:41
I have written BlackBerry code to add an image to a ButtonField. I want the whole button to be occupied by the image, but the image is not displayed completely on the ButtonField. There is a lot of margin on the top, left and right of the button. I tried to use cellpadding but it didn't work. How can I reduce the width and height of the ButtonField so it matches the original image size of 41 x 41? Jonathan Instead of adding an image to a button extend the image class and turn that into a button by overriding isFocusable(), navigationClick(), trackwheelClick(), and keyChar(). Here's the code:

j2me - How to create a master-details UI

a 夏天 提交于 2019-12-01 13:34:16
I'm stuck in the middle of j2me project because I have no idea how to do something that would be easily done in other platforms, but that doesn't seem to have a direct solution in java me/j2me. What I need to do is this (it doesn't matter if it is with Netbeans MIDP components, LWUIT or plain lcdui) I have to display a list of customers (read from a web service) in some sort of table, and when the user navigates up or down the rows, a "Details" command must be shown so that the user can see the details for that specific customer. Something like this image: I know I can always use a List, but

j2me - Out of memory exception, does it have anything to do with the maximum heap or jar size?

坚强是说给别人听的谎言 提交于 2019-12-01 13:24:55
I'm currently developing an app for taking orders. Before I ask my question, let me give you a few details of the basic functionality of my app: The first thing the app does once the user is logged in, is to read data from a webservice (products, prices and customers) so that the user can work offline. Once the user have all the necessary data, they can starting taking orders. Finally, at the end of the day, the user sends all the orders to a server for its processing. Now that you know how my app works, here's the problem : When I run my app in the emulator it works, but now that running