java-me

Error: Cannot run program “jar”: CreateProcess error=2, The system cannot find the file specified

左心房为你撑大大i 提交于 2019-11-27 03:08:18
问题 When I run my BlackBerry project in Eclipse, I get the following error: Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified How is this caused and how can I solve it? 回答1: you can solve this problem by following setting Right Click My Computer -> Select Properties-> Select AdvancedSystem Settings Tab -> Environment variables Click on new button and Add Variable Name : JAVA_HOME Variable Value : C:\Program Files\Java\jdk1.7.0\ note jdk not jre 回答2:

Java ME UI libraries

耗尽温柔 提交于 2019-11-27 02:18:20
问题 I'm developing a Java ME app & need pointers to some really good UI libraries. I did see a few such as Java ME Polish. Are there any more out there? For e.g. ebuddy's java ME app has an amazing UI and so is gmail's java ME app. What libraries would they have been using or would have they have developed it on their own? 回答1: Sun recently released and opensourced their solution to crappy looking lcdui. It is called LIghtweight UI Toolkit and can be found on lwuit.dev.java.net 回答2: We have been

How to get phone number in J2ME?

試著忘記壹切 提交于 2019-11-27 01:39:15
问题 How to get the phone number (not contact numbers,etc) in J2ME application ? The phone number that belongs to sim card in the phone. 回答1: phone number that belongs to sim card in the phone... above assumption is wrong. sim card does not store your phone number SIM card stores only a unique identifier which has nothing to do with your phone number. The way mobile interacts with network is about as follows: - [phone] hello network, ID on my SIM is 12345 - [network] hello 12345, I recognized you

BlackBerry - draw image on the screen

最后都变了- 提交于 2019-11-27 00:40:04
问题 How to draw png images with specific size and position on the screen? 回答1: Resize image public EncodedImage sizeImage(EncodedImage image, int width, int height) { EncodedImage result = null; int currentWidthFixed32 = Fixed32.toFP(image.getWidth()); int currentHeightFixed32 = Fixed32.toFP(image.getHeight()); int requiredWidthFixed32 = Fixed32.toFP(width); int requiredHeightFixed32 = Fixed32.toFP(height); int scaleXFixed32 = Fixed32.div(currentWidthFixed32, requiredWidthFixed32); int

Getting Device IMEI

孤街浪徒 提交于 2019-11-26 23:22:18
问题 How to get the IMEI of a Java ME device in a common way that is applicable to all devices 回答1: Usually, using java.lang.System.getProperty() can return the device IMEI. Unfortunately, the String parameter you need to use to get the IMEI will change from one handset manufacturer to the next. Strings to try: imei phone.imei com.lge.imei com.nokia.imei com.nokia.mid.imei com.siemens.imei com.sonyericsson.imei com.motorola.imei ... you get the idea. you may need to uppercase the last part of the

Stop thread and again start giving IllegalThreadStateException in blackberry

ⅰ亾dé卋堺 提交于 2019-11-26 23:14:50
问题 I am getting IllegalThreadStateException exception when using following code: I have already started this thread once(by using thread.start() ) and again trying to start it at another place, so used following code: thread.interrupt(); thread.start(); But thread.start() is throwing IllegalThreadStateException . What should I use to solve it? 回答1: Thread objects are only meant to be started once. If you need to stop/interrupt a Thread , and then want to start it again, you should create a new

Image Button in BlackBerry

南楼画角 提交于 2019-11-26 22:35:48
How do I implement an image button in BlackBerry? here you go, complete code: import net.rim.device.api.system.Bitmap; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.component.ButtonField; /** * Button field with a bitmap as its label. */ public class BitmapButtonField extends ButtonField { private Bitmap bitmap; private Bitmap bitmapHighlight; private boolean highlighted = false; /** * Instantiates a new bitmap button field. * * @param bitmap the bitmap to use as a label */ public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight) { this(bitmap, bitmapHighlight,

Embedded HTML control for Blackberry?

瘦欲@ 提交于 2019-11-26 21:40:31
问题 Is there any api for viewing html content from w/in your blackberry application? To be clear, I don't mean launching the browser on top of my app to view a page. But rather rendering the page w/in my app. 回答1: Yes. Check out the net.rim.device.api.browser.field package or the Blackberry Browser section of application integration. Everything sort of finishes here: Field field = browserContent.getDisplayableContent(); See: JDE 4.0.0 API for the package RIM app integration guide Signed only api,

Playing Audio with J2ME

。_饼干妹妹 提交于 2019-11-26 21:24:26
问题 What is the best way to play audio utilzing the J2ME Media libary? For example, should I make use of the MMAPI or should I just use the Midlet's platformRequest(String s) method? 回答1: The following code should work for 90-95% of handsets out there that support JSR-135. Ordering of all the various method calls is key for this to be portable. This is for sounds local to your JAR. Any streamed audio would be another problem altogether :) // loads the InputStream for the sound InputStream

Extract source code from .jar file

我的未来我决定 提交于 2019-11-26 21:20:55
Is there a way to extract the source code from an executable .jar file (Java ME)? adarshr Use JD GUI . Open the application, drag and drop your JAR file into it. elachance You can extract a jar file with the command : jar xf filename.jar References : Oracle's JAR documentation dharam I believe this can be done very easily. You can always extract the source files (Java files) of a jar file into a zip. Steps to get sources of a jar file as a zip : Download JAD from http://techieme.in/resources-needed/ and save it at any location on your system. Drag and drop the jar for which you want the