java-me

Java Http Client to upload file over POST

放肆的年华 提交于 2019-11-26 13:08:00
问题 I\'m developing a J2ME client that must upload a file to a Servlet using HTTP. The servlet part is covered using Apache Commons FileUpload protected void doPost(HttpServletRequest request, HttpServletResponse response) { ServletFileUpload upload = new ServletFileUpload(); upload.setSizeMax(1000000); File fileItems = upload.parseRequest(request); // Process the uploaded items Iterator iter = fileItems.iterator(); while (iter.hasNext()) { FileItem item = (FileItem) iter.next(); File file = new

Moving to Android from J2ME [closed]

空扰寡人 提交于 2019-11-26 13:07:16
问题 Coming from J2ME programming are there any similarities that would make it easy to adapt to Android API . Or is Android API completely different from the J2ME way of programming mobile apps. 回答1: Actually the Android API is much more powerful than the J2ME. It is much easier to create an application for the Android. Using the J2ME you are limited to simple forms due to the absent of swing-like libraries (though now there exists a library called LWUIT, avoiding the need to recreate from

Android how to get access to raw resources that i put in res folder?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 13:05:07
In J2ME, I've do this like that: getClass().getResourceAsStream("/raw_resources.dat"); But in android, I always get null on this, why? Adrian Vintu InputStream raw = context.getAssets().open("filename.ext"); Reader is = new BufferedReader(new InputStreamReader(raw, "UTF8")); For raw files, you should consider creating a raw folder inside res directory and then call getResources().openRawResource(resourceName) from your activity. sravan In some situations we have to get image from drawable or raw folder using image name instead if generated id // Image View Object mIv = (ImageView) findViewById

J2ME VS Android VS iPhone VS Symbian VS Windows CE [closed]

笑着哭i 提交于 2019-11-26 12:56:42
问题 I have very little idea about mobile platforms, though I am interested to program for them. Would you please compare J2ME VS Android VS iPhone VS Symbian VS Windows CE . I would like to know: which one is better which one should I choose and why if there is any VM technology to test the programs is there any IDE, debugging facilities? Personally, I would like to code for open source, but any suggestions are welcome. I have preliminary knowledge on Java. I would also like to know, if there is

What mobile platform should I start learning? [closed]

扶醉桌前 提交于 2019-11-26 11:58:56
问题 What mobile platform should I start learning? What matters is: ease popularity of the platform low cost of the SDK and actual handheld 回答1: I think 3-4 platforms have a future. But it depends on what platform do you like and how you like freedom in distributing your applications :) Windows Phone 7 .NET and Silverlight through Windows Phone Marketplace Android Java through Android Market (fees) or like normal applications iPhone Objective-C or Java (Developing iPhone Applications using Java)

How do I convert between ISO-8859-1 and UTF-8 in Java?

对着背影说爱祢 提交于 2019-11-26 11:43:52
Does anyone know how to convert a string from ISO-8859-1 to UTF-8 and back in Java? I'm getting a string from the web and saving it in the RMS (J2ME), but I want to preserve the special chars and get the string from the RMS but with the ISO-8859-1 encoding. How do I do this? In general, you can't do this. UTF-8 is capable of encoding any Unicode code point. ISO-8859-1 can handle only a tiny fraction of them. So, transcoding from ISO-8859-1 to UTF-8 is no problem. Going backwards from UTF-8 to ISO-8859-1 will cause "replacement characters" (�) to appear in your text when unsupported characters

Asp.net WEB API - What problems could arise if I use POST instead of PUT and DELETE?

吃可爱长大的小学妹 提交于 2019-11-26 11:31:09
问题 I\'m just starting to use Web API and though I found it really easy to create the methods and some configurations I needed, now I run into a problem I don\'t know how to solve. Some of the applications that will consume my services are very old and don\'t support DELETE and PUT methods (j2me applications for example) I have found that it is possible to do some kind of method emulation by passing something like this : _method=DELETE|PUT However, I\'m not really sure if Web API will be able to

Difference between Java SE/EE/ME?

大城市里の小女人 提交于 2019-11-26 11:26:30
Which one should I install when I want to start learning Java? I'm going to start with some basics, so I will write simple programs that create files, directories, edit XML files and so on, nothing too complex for now. I guess Java SE (Standard Edition) is the one I should install on my Windows 7 desktop. I already have Komodo IDE which I will use to write the Java code. 6006604 Java SE = Standard Edition . This is the core Java programming platform. It contains all of the libraries and APIs that any Java programmer should learn (java.lang, java.io, java.math, java.net, java.util, etc...).

Tab bar in blackberry without ToolBarManager

耗尽温柔 提交于 2019-11-26 11:15:48
问题 I want to create a tool bar of exact look and feel for my blackberry project. Any help is greatly appreciated. Please note I cannot use ToolBarManager. My project should support all devices after OS 5.0 Thanks 回答1: This is a sample code that how to create Tabs in blackberry. I had total 3 screens after statUp (which extends UiApplication) class LoadingScreen.java public class LoadingScreen extends MainScreen { int current_index=0; BottomPanel bottomPanel; public LoadingScreen(int current

Is there any option for local database like Sqlite for j2me - CLDC devices?

匆匆过客 提交于 2019-11-26 10:59:37
问题 Is there any option for local database like Sqlite for j2me - CLDC devices? PerstLite and OpenBaseMovil are both under dual license. Is there any open source option for this? Or, any alternate way of developing application. 回答1: from List of Database in J2ME: Apache Derby - an open source relational database / about 2 megabytes Java DB - Sun's supported distribution of Apache Derby database / footprint of 2.5 MB Floggy - free object persistence framework for J2ME/MIDP applications / 11k API