java-me

Developing a J2ME application on Ubuntu in the current year?

依然范特西╮ 提交于 2021-02-17 06:31:28
问题 I recently dug out an old phone that runs J2ME applications and would like to write applications for it, in my attempts to get the SDK running with Netbeans and figure out the emulator I've hit many roadblocks caused by various compatibility issues due to the toolchain being so old. So my question is this: What is the most straightforward, minimalist way for me to compile a J2ME hello world application. I don't need an IDE and am fine without an emulator, I just want to use Ubuntu to produce

Developing a J2ME application on Ubuntu in the current year?

半世苍凉 提交于 2021-02-17 06:31:01
问题 I recently dug out an old phone that runs J2ME applications and would like to write applications for it, in my attempts to get the SDK running with Netbeans and figure out the emulator I've hit many roadblocks caused by various compatibility issues due to the toolchain being so old. So my question is this: What is the most straightforward, minimalist way for me to compile a J2ME hello world application. I don't need an IDE and am fine without an emulator, I just want to use Ubuntu to produce

Convert byte array to String

大憨熊 提交于 2021-02-11 12:59:56
问题 How do I convert a byte array to a String in BlackBerry? I have used new String(bytearray,encoding type); I am getting [B@fb5955d6 when calling toString().Can anyone help get this string in a readable format for BlackBerry? 回答1: You don't show us where this byte data is coming from, or what value you expect it to have. So, I'm not sure I can fully debug your problem. But, hopefully this helps: The reason you are seeing [B@fb5955d6 printed out when you simply call toString() on your byte array

Convert byte array to String

邮差的信 提交于 2021-02-11 12:57:10
问题 How do I convert a byte array to a String in BlackBerry? I have used new String(bytearray,encoding type); I am getting [B@fb5955d6 when calling toString().Can anyone help get this string in a readable format for BlackBerry? 回答1: You don't show us where this byte data is coming from, or what value you expect it to have. So, I'm not sure I can fully debug your problem. But, hopefully this helps: The reason you are seeing [B@fb5955d6 printed out when you simply call toString() on your byte array

Rounding a double to 5 decimal places in Java ME

孤街浪徒 提交于 2020-02-10 09:03:49
问题 How do I round a double to 5 decimal places, without using DecimalFormat ? 回答1: You can round to the fifth decimal place by making it the first decimal place by multiplying your number. Then do normal rounding, and make it the fifth decimal place again. Let's say the value to round is a double named x : double factor = 1e5; // = 1 * 10^5 = 100000. double result = Math.round(x * factor) / factor; If you want to round to 6 decimal places, let factor be 1e6 , and so on. 回答2: Whatever you do, if

Rounding a double to 5 decimal places in Java ME

人走茶凉 提交于 2020-02-10 09:02:51
问题 How do I round a double to 5 decimal places, without using DecimalFormat ? 回答1: You can round to the fifth decimal place by making it the first decimal place by multiplying your number. Then do normal rounding, and make it the fifth decimal place again. Let's say the value to round is a double named x : double factor = 1e5; // = 1 * 10^5 = 100000. double result = Math.round(x * factor) / factor; If you want to round to 6 decimal places, let factor be 1e6 , and so on. 回答2: Whatever you do, if

Rounding a double to 5 decimal places in Java ME

旧城冷巷雨未停 提交于 2020-02-10 09:02:50
问题 How do I round a double to 5 decimal places, without using DecimalFormat ? 回答1: You can round to the fifth decimal place by making it the first decimal place by multiplying your number. Then do normal rounding, and make it the fifth decimal place again. Let's say the value to round is a double named x : double factor = 1e5; // = 1 * 10^5 = 100000. double result = Math.round(x * factor) / factor; If you want to round to 6 decimal places, let factor be 1e6 , and so on. 回答2: Whatever you do, if

Rounding a double to 5 decimal places in Java ME

感情迁移 提交于 2020-02-10 09:02:15
问题 How do I round a double to 5 decimal places, without using DecimalFormat ? 回答1: You can round to the fifth decimal place by making it the first decimal place by multiplying your number. Then do normal rounding, and make it the fifth decimal place again. Let's say the value to round is a double named x : double factor = 1e5; // = 1 * 10^5 = 100000. double result = Math.round(x * factor) / factor; If you want to round to 6 decimal places, let factor be 1e6 , and so on. 回答2: Whatever you do, if

Getting a HTTP connection in J2ME

徘徊边缘 提交于 2020-02-07 05:44:25
问题 I am trying to get a response from J2ME application for link www.google.com But can't so because i get an error output as such Running with storage root C:\Users\YK0089731\j2mewtk\2.5.2\appdb\QwertyDevice Running with locale: English_United States.1252 Running in the identified_third_party security domain No audio device found. java.io.IOException: Error initializing HTTP tunnel connection: HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is

Multiline labelfield

自古美人都是妖i 提交于 2020-02-02 07:35:46
问题 I must show a string that can or not be large enough to not fit in one line in all devices, I want labelfield control to automatically show remaining text in a "new line" after the original one, I mean like... auomatic carret return if the string cannot be showed in a single line, all mobile OS I have tried do this, but I cannot make BB OS to work, it just truncates my string whenever it likes and it's very annoying. Thank you 回答1: One way to do this is put your HorizontalFieldManager that