Is j2me fast?

i plan on making apps for my s700i phone. i need some input as to what platform to use (e.g. j2me, symbian C++). also if u have any information concerning optimal mobile client/server frameworks (e.g. j2me-php-mysql), that would really help. thanks in advance.

says who? have a look at
[url=http://java.sun.com/developer/technicalArticles/I
nterviews/goetz_qa.html]thisBut, just compare the performance of Visual Studio (written in C++) with that of NetBeans (written in Java). Even though u might argue that these are desktop apps, still both J2SE and J2ME, use JVM.

Similar Messages

  • Creation of a database engine for mobile devices using j2me

    am trying to develop a database engine for mobile devices.. it is to develop a miniature version of the DBMS that
    can be deployed on a mobile phone..I have to develop my own code for performing tasks such a s creating a table,
    inserting values into it, selecting from it etc..
    I limited my self to develop the software so that it can perform 3 functionalities of create, insert,select..
    I should be taking the details such as table name and its parameters from the user and then should be able to
    create a suitable data structure for it(i tried to develop a class)...
    Usage of RMS package helps me partially in this.. I did that and ll be doing that..
    I got stuck while developing the code for creation of a table.. I am facing problems in creating a dynamic data
    structure for a table and also to use such data structure else where in my project..
    I need help in developing an algorithm for this..
    I would be very grateful to u all if u help me out in developing the code for this project..

    I'm sorry for the amount of time it took me to get back. Derby is an open source database written entirely in Java. I do not know if it can support resource constrained devices like MIDP compliant, but may work okay with CLDC.
    But outside of Derby being a solution, let me give you a few ideas off the top of my head.
    Set up a database server in a separate thread. This server will really be your controller for RMS access.
    Since RMS is just a big sequential 'pipe' you will have to think of data as 'frames' - (starttable) (tableID) (tablename) (data) (tablename) (data).....(endtable).
    When you need to write additional data, just append it to the end of the RMS object.
    When you need to retrieve data, thing are more complex.
    1. Read in all data, looking for your particular tableID. This may be made much easier using RMS filters - (I'm not sure, I've never used them)
    2. Once start of table of interest is found, stick the data elements in either a java vector or array until you reach the table end identifier. I think vector will be a better choice - trust me. (I think its available in J2ME...)
    3. Package this into a do while loop until the element you are searching for is read. If you need to do some sorts on the data or something else that requires the all the data to be present then you need all the data for that particular table. One thing will always be clear. The first data you grab will always be some start table identifier and the last data you grab will be an end table identifier. We just don't know which table because of how we put stuff in the RMS resource.
    This provides you a few positives as well as negatives:
    Positive:
    1. Fast data writes, no need to search for a particular table before accessing it, nor do you need to search for an index in that table.
    2. When looking for data, data may* be found without searching through the entire table. This is accomplished with RMS filters or logic test within the RMS read loop.
    Negative:
    1. Slow when all data of a table is needed (i.e. compute sums or averages of entries). The entire RMS database must be read to ensure all the entries are searched. An example of how this is a problem is as follows: You have 5000 entries in you RMS database resource and you are looking to compute the average of a value in some table. When you first wrote the data to the table, it was done sequentially and no other data for that table exist. But we can't tell if that's the case, so we have to read through all 5000 entries to make sure we looked for every piece of data.
    Beacuse of this issue, this database structure, performance may be fine for 50K - 100K entries (depending on table element size), if the reading requirements don't force full data reads. Otherwise, 25K may be an upper limit.
    I hope this helps.
    Edited by: estarkey on Mar 17, 2009 9:15 PM
    Edited by: estarkey on Mar 17, 2009 10:01 PM

  • How to connect NFC in J2ME emulator

    1 down vote favorite
    1
    how to do the connection for NFC in j2me emulator. If anyone has already work on this project kindly help me to figure out the problem, and please shared me if you have any demo code related to this project. Thanks

    Just to clarify - in the USA, ATT/3G (GSM) models need a micro-SIM; Verizon (CDMA) models don't
    In other countries, the great bulk of providers use GSM (and so will need a micro-SIM). CDMA tends to be concentrated in Asia (there's no hard and fast rule)
    I don't know whether any CDMA providers outside the USA support the iPhone yet.

  • Problem in mobile phone camera Image retrieval using J2ME ...

    Hi
    I am doing video surveillance application with mobile phone ...
    but i am not able to get the images faster from my mobile phone ..
    I need atleast 2 photos /frames per second using J2ME ...
    wen i tried it , it is very slow and i am not able to get 2 frames per second ...
    can somebody help me ?

    That's quite a bunch of stuff you want to do there.
    Just a short hint for the image processing part here: You can ask any BufferedImage for it's raster (using getRaster()), and you can use the raster's getData() method to access the DataBuffer (the array storing the pixel values). It should be quite easy to split the DataBuffer into 9 tiles which you can then store as blobs. You can also use the DataBuffer to check for color values, or, if you don't want the trouble, you can always use the raster's getRBG(...) method - beware though, it's a lot slower for processing large quantities of pixels. Just another hint: you will have to cast the DataBuffer to it's real type if you want to access the pixel values, for example to DataBufferByte for most RGB images. You can use the DataBuffer's getType() method to determine which kind of buffer the image is using.

  • Design Patterns, OO Design, and J2ME performance

    Hello- I am a J2ME newbie. I am a design patterny/OO kind of guy using J2SE. I'm trying to create a facade for the business logic on a project I'm working on which will work on both J2ME and J2SE. I have come up with an acceptable design, but I am afraid that the bytecode may end up being way too large for J2ME. For example, I used the command pattern for some functionality, which results in many small Command classes, which is nice for extensibility and functional encapsulation, but creates extra bytecode. Another example is I like to throw specific business exceptions, however, those also require a separate class for each exception. Another example is I like to use TypeSafe enumerations, again, new, unnecessary classes.
    I am aware of some workarounds (create a generic business exception, just put info into the message, don't use the command pattern, use bytes for non-typesafe constants), but I find myself resisting due to my hardcore OO/best practices tendencies. I guess J2ME is a whole different programming paradigm. How are you guys dealing with these issues? The most important issues with J2ME programming are small footprint and high performance, right? I guess I could write more procedural-ish code, but I am interested in any compromises that the OO guys here have come up with. Also, what size is an acceptable library/sdk in J2ME?
    thanks,
    Abraham

    I'm not an OO guy, but I can definitely say that you'll will have to find some comprmises in your designs (the generic business exeption is a very good example).
    Since you are making business apps, you do get some leeway on two issues:
    * As opposed to games, where every cycle counts, for a business app maintainability and scalability are you usually more important than performance, so OO techniques will often be a better choice than a slightly faster implementation.
    * You probably have more control over the devices you will be targetting. The most common limitation for MIDlet size these days is 64KB, so a library that more than 20-30KB probably won't be any good on these phones. But if you know your apps will be run on higher end phones you can make it a lot bigger, since they can often have MIDlets that are up to several MB in size.
    shmoove

  • HELP!! Nokia's API classes not found with j2me WTK

    I setup j2me WTK, jdk1.4.2 and also Nokia's SDK (Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1) on my Win NT 4.0 machine.
    J2ME samples (shipped with it) are working fine with ktoolbar. but when i try to build & run nokia samples, they are always giving error "FullCanvas class not found" and "package com.nokia.lcd.ui.* not found". I am sure it is the problem of placement of classes of nokia at correct place inside j2me's WTK. However, i followed the guidelines to install symbian sdk inside wtk401\wtklib\devices folder (as per instructions of forum nokia). But i am still not able to get it running. Any expert suggestions, then plz respond me , i am in urgent need to solve this issue!!!! plz help me!!!!

    Hi,
    Maybe I'm being thick but I can't get this work. I've tried zipping the com/nokia stuff into the midpapi.zip. And I've tried just replacing midapi.zip with classes.zip from the nokia emulator. But it still says:
    "package nokia.mid.ui does not exist
    import nokia.mid.ui.*;"
    I'm using ktoolbar 1.04.
    Many thanks!
    CP
    Hey, thanks for the great tip. Was also using
    KToolbar because it runs faster on my slow laptop than
    Sun One studio.
    With the later version of WTK, the paths
    C:\...\WTK21\lib contains 2 files, midpapi20.zip and
    midpapi10.zip
    The later contains classes for compiling to MIDP1.0
    standard. I think most people use this. Replace it
    the class.zip in
    C:\Nokia\Devices\Nokia_7210_MIDP_SDK_v1_0\lib if
    you're using the same SDK as I am, and don't forget to
    rename it.
    Cheers.

  • Dynamic application...Need Help fast

    Hi experts...
    I really hope somebody can help me in here...I am going to make an appliaktion in J2me...It shall be possible to change a picture by calling a function. I have 10 pictures, which I will change on the screen by calling a function with diffrent parameters. The picture shall be shown in a form with other elements. I dont want to make a new form everytime. I also have som icons which i also wants to change by calling a function.
    I have read something about layers. I thought maybe i could change between the pictures on that way...
    I would like to see an code example on how to change a picture in a form...

    If you really want this fixed fast, you should consider:
    The more information you provide about the crash, the better. You didn't indicate what program you were using and you also seemed a bit frustrated when you posted and didn't quite finish the sentence concerning the 501 folder, which I can only assume, appeared in your trash, as I think I've seen this before after a program quits unexpectedly.
    According to the crash report, it appears that the program that is crashing is Adium.
    You can try reinstalling the program to see if something has been corrupted in the program package.
    You can check to see if there is a more up to date version of the program. You might be dealing with a bug that has been fixed in a more recent version.
    You can hunt for the preferences by doing a file search in the library/preferences folder to see if you can find all the preferences associated with adium and delete them. You will most likey loose all your preference setting and any login information, since it's an IM program, but at least you can get it up and running again.
    Don't delete the preference files until you have verified that the other two solutions do not work. There's no need to go through re-intering the preferences you want if you can fix the problem by reinstalling the program, which doesn't mess with your preferences.

  • J2ME MMS send/receive (WMADemo app) now fails on all UK mobile networks!

    I built a J2ME CLDC mobile app that has run successfully in several countries for the past 4 years.
    It is a messaging app based on the J2ME MMS send/receive functionality in the Wireless Messaging API (wma11.jar and wma20.jar), which allows message parts to be assembled into an MMS and sent between mobile devices and have the receiving device's push registry recognise the incoming MMS and launch the J2ME app to display the message content.
    This functionality is demonstrated in the Sun Wireless Toolkit (WTK) demo app WMADemo, which always worked perfectly.
    As of July 2011, my app stopped working on all UK mobile networks but continues to work successfully on mobile networks in other countries (including USA and India). The WMADemo app has also similarly ceased to work.
    The problem is that the incoming MMS is no longer recognised by the mobile device's push registry and thus gets sent directly to the device's default MMS inbox and therefore does not launch the J2ME app.
    I have spent months trying to track down the cause of the problem. It is impossible to get any answers from any of the UK mobile networks.
    It seems clear that the UK mobile networks have made some change to the protocols on their MMS servers but I cannot find out if this is the case.
    Testing has shown that this is not a MIME type issue. So it is likely a change in the security settings on the MMS servers. For obvious reasons, the actual content of the generated MMS messages is binary data for interpretation by the receiving app. So it is possible this binary data is now being blocked in some way by the UK networks.
    This is a business critical application and I am getting nowhere with the UK networks (Orange is the only one that bothered to reply but is very slow in progressing and OfCom and the Ombudsman can do nothing to help).
    Have any of you guys hit this problem? I desparately need to find out the cause and resolve this issue as soon as possible.
    Thank you in advance for any advice, pointers or suggested solutions.

    Yes, I agree - 10 seconds can be a bit short for a backlight, but it makes you read faster and act faster - and that is a skill you can use everywhere in live.
    In my next Nokia I hope they take it down to 9 seconds :-)

  • Elliptic curve encryption with J2ME

    hi there.
    i'm using the bouncycastle apis to encrypt a small amount of data (e.g. 20 chars) using ECIES. All the documentation seems to point to ECC as being faster/requiring shorter keys/less power-hungry etc than RSA, however, with the example code I have, the encryption time on a high end mobile is ridiculous.
    I'm thinking that the example G, n, a, b, and Q are for larger key sizes. Does anyone know how I can generate these values for a 160b ECC key, or a good bouncycastle/j2me ECC tutorial/sample code?
    Thanks in advance.
    caid

    No Sun provider implements the EC algorithms at this time.
    Here's an easy solution that works (Using NSS):
    http://blogs.sun.com/andreas/entry/elliptic_curve_cryptography_in_java
    NSS has been recently FIPS re-approved.
    BouncyCastle is another option if FIPS doesn't matter to you at all and you want pure java.
    Edited by: dstutz on Mar 10, 2008 7:49 AM

  • J2ME Countdown Timer

    I'm working on a J2ME game that requires the use of a countdown timer. I've put in a Timer.scheduleAtFixedRate call inside my run() method, but apparently it's taking up a lot of resources and it's proceeding too fast (a 3-minute countdown will finish in about 30 seconds or less).
    I have a separate method that calculates the amount of time left in terms of minutes and seconds, and the output will jump irregularly (say from 2:59 to 1:13 to 0:57, and so on).
    Here's the piece of code in question:
        public void run() {
            Thread currentThread = Thread.currentThread();
            //timeLeftInMillis is an int
            timeLeftInMillis = 180000;
            try
                // This ends when myThread is set to null, or when
                // it is subsequently set to a new thread; either way, the
                // current thread should terminate.
                while (currentThread == myThread)
                    //myTimer is a Timer object instantiated in the
                    //constructor
                    myTimer.scheduleAtFixedRate(new TimerTask () {
                        public void run(){
                            GameScreen.timeLeftInMillis=GameScreen.timeLeftInMillis-1000;
                            System.out.println(GameScreen.timeLeftInMillis);
                            if (GameScreen.timeLeftInMillis<= 0) {
                                    synchronized (this) {
                                        GameScreen.isGameOver = true;
                                        this.cancel();
                    }, 0, 1000L);
                    repaint(0, 0, screenWidth, screenHeight);
                    serviceRepaints();
            catch (Exception e)
        }Can anyone help me figure out what's wrong with this timer? Any help at all would be appreciated.
    Thanks. :)

    Problem solved. :)
    Comments are welcome. :)
        public void run()
            int millis_per_tick = 100;
            int counter = 1000/millis_per_tick;
            timeLeftInMillis = 180000;
            Thread currentThread = Thread.currentThread();
            try
                // This ends when myThread is set to null, or when
                // it is subsequently set to a new thread; either way, the
                // current thread should terminate.
                while (currentThread == myThread)
                    long startTime = System.currentTimeMillis();
                    repaint(0, 0, screenWidth, screenHeight);
                    serviceRepaints();
                    long timeTaken = System.currentTimeMillis() - startTime;
                    if (timeTaken < millis_per_tick)
                        synchronized (this)
                            wait(millis_per_tick - timeTaken);
                    if (counter == 0) {
                        timeLeftInMillis = timeLeftInMillis - 1000;
                        counter = 1000/millis_per_tick;
                    else
                        counter--;
                    if (timeLeftInMillis<0) {
                        synchronized(this){
                            isGameOver = true;
            catch (InterruptedException e)
        }

  • Encryption in J2ME

    Hello all
    I have a j2EE application using Mysql database. I'm interested in providing an extension to the system so that data can be input using a mobile using J2ME. The midilet interacts with a http connection servelet which in turn updates the database. What I'm looking for is proper encryption of data send from/to the mobile. does J2ME support encryption(like triple DES). How do i do it? if this is not possible then what is the solution.
    thanks in advance.

    Hi,
    There are two ways to achieve this.
    one is either use bouncy castle, as mentioned in the previous replies, or you can also use the SATSA(security and trust services API), a crypto API for MIDP phones, which is an official JSR. (JSR-177)
    IT all depends on the phone capabilities. I would put my money on SATSA because it is faster than Bouncy castle, but since it is a JSR, your phone may / may not support it.

  • J2ME "instead of" J2SE?

    At our company we are thinking about a system that involves slimmed down PCs mounted in trucks. (There will also be an fleet management center at the companies head office.)
    Approx PC spec; 200 - 300 MHz CPU, no harddisk but flash RAM maybe 512 MB, 10 inch TFT color screen. Keyboard and probably a CD/DVD reader. OS; Win CE, WinXP Embedded or Linux.
    A map/navigation application would run on these. Another application will handle forms (an AWT-GUI will probably do).
    We hope to find a commercial map app to install.
    I would like to develop the other app in Java but the PC bulider didn't like the idea of runnig J2SE on that limited platform.
    How about developing in J2ME? Pros and cons?
    Can I just download J2ME from Sun, develop and run as I'm used to with J2SE? If we are running the JRE on Windows. Do we have to implement or port J2ME ourselfs.
    I have developed in J2SE (Swing, Java 2D) and a little in J2EE (JDBC, EJB, Applets).

    The original question is very interesting: should a mobile app move from J2SE to J2ME?
    The answer is not simple at this time because the specs are evolving fast.
    GUI features and h/w and OS portability is definitively a current factor but may not be important for many applications. A corporate application can usually select a set of hardware, OS and Java runtimes to support so all you have to do is make sure that your platform satisfies your business requirements and not the business requirements of the rest of the world.
    Mobile GUI in J2ME is being improved by some new specs in progress and to be implemented probably in runtimes shipped in 2005.
    TCP/IP features are now fully supported by MIDP2 (the socket and server socket are optional in the spec bu the all MIDP2 runtimes being shipped today support them).
    Floating-point arithmetic is now supported by the underlying spec., CLDC 1.1; it was not supported by CLDC 1.0.
    New specs have been proposed recently and are being supported by new J2ME runtimes: for example Wireless Messaging API (JSR-120, WMA) and Mobile Media API (JSR-135, MMA).
    The set of mobile Java specs including MIDP are being regrouped by the JTWI spec: Java Technology for Wireless Industry (JSR-185).
    The way to go in today's fast changing mobile technologies is CLDC and the specs supported by it:
    -      Connected Limited Device Configuration (CLDC)
    -      Mobile Information Device Profile (MIDP)
    -      Java Device Test Suite
    -      Information Module Profile (JSR-195)
    -      Java Technology for Wireless Industry (JSR-185) <<<<<<<<<<<<<<<<<<<<<<<<
    -      Wireless Messaging API (JSR-120)
    -      Mobile Media API (JSR-135)
    -      Location API for J2ME (JSR-179)
    -      SIP API for J2ME (JSR-180)
    -      Security and Trust Services API for J2ME (JSR-177)
    -      Mobile 3D Graphics (JSR-184)
    -      J2ME Web Services (JSR-172)
    -      Bluetooth API (JSR-82, Motorola, Java Partner Site)
    It looks like very soon if not already now, J2ME will have more features than J2SE for most interconnected mobile applications. For example, today, a MIDP2 device can install a new J2ME application over-the-air (OTA), something that cannot be done easily by J2SE, I believe. All the user has to do to install OTA is to browse to the web page with her mobile device that contains an html anchor () to the jad file referencing the application (a MIDlet) and the rest is automatic and the programmer has nothing to write to get this feature.
    serge

  • J2ME dev tools for simple demo apps

    Hello community,
    I 've been using Java for a long time and recently got a project involving j2me. Its mostly apps for demo purposes, therefore there is not a lot of logic/network traffic involved. For example, one app is a bunch of screens guiding the user throught different text blobs and pictures. It is very similar in structure to browsable content, with links and forms, just like a very simple HTML site.
    I have always used netbeans for developing java, and it seems that it has some neat tricks for create ME apps.You can use a nice drag and drop design mode that also auto-gens code. But I have found a tool like http://www.cascadamobile.com/ , in which you write simple HTML/js pages that link to each other and then this thing will generate the j2me code from that. That would be exactly what I would need for my purpose, save for the fact that the product is Ad-supported, so its a no-go.
    Maybe I could make a j2me app as a WML-browsable content so that I would just have to compose the wml and then the app would just "browse" them from the phone's memory?
    In any case, the question is, are there any fast tools for making simple (mostly demo) apps, in a j2me environment?
    Thank you.

    RealBasic, Metrowerks Codewarrior, you might find some references on http://developer.apple.com/ and one software vendor I know still makes software for it is http://www.lemkesoft.com/
    And they might be able to tell you what tools they use.

  • Graphical benchmark for Java (J2ME) phones and PDAs: JBenchmark

    JBenchmark measures the performance of Java (J2ME) enabled phones and PDAs, by running 5 small tests, each lasting for 10 seconds:
    1. Text
    2. 2D Shapes
    3. 3D Shapes
    4. Fill Rate
    5. Animation
    Check results and download software at www.jbenchmark.com!

    Wow.. i thought I bought a good phone. But reading the JBenchmark for the SonyEricsson T610 wasn't fun at at all. Are other phones really up to 3 times faster? Anyone with experiance from testing with other phones?

  • J2ME PP and Swing

    I'm currently porting some of the Swing classes to J2ME (or atleast trying to).
    Have come across a problem with a method in java.awt.Component. The getPeer() method has been depreciated in J2SE and removed in J2ME, but it is used by some of the swing classes. While i realise that the J2ME awt implementation was not designed to run swing, i wondered if anone had any ideas on how to get around this.
    From looking at the J2SE source for java.awt.component, the getPeer method (whcih returns a java.awt.peer.ComponentPeer) reveals some info about the state of the peer variable (of type ava.awt.peer.ComponentPeer).
    Please Help, im totally lost.
    regars, danny.

    it is easy to port swing to J2ME PP. Just get the Foundation classes from sun (http://java.sun.com/products/jfc/download.html). Correct a bug in the files (you have to search in the internet to find the solution), and it woks!!!
    The only problem is that it is very very slow. That is the only reason to try and rewrite the swing classes.
    I did it for IBM WEME PP, but if you have a faster solution I would like to see it.

Maybe you are looking for