Problems with J2ME

I need transfer data from servidor (web site) to MIDLET? , How i do it?
please help me!!

use httpconnection to access that server side application

Similar Messages

  • Problems with j2me gaming

    Hi guys. I need you to help me with this problem. I'm developing a j2me game using netbeans and the gamebuilder component. So everything it's ok, but the problems come when I charge the application into my cellphone. The first problem is on the collidesWith() method. In spite of the hero sprite and the enemy sprite are saperated from many pixels, the CollidesWith method fires by itself. As an example, the hero sprite is at the top of the screen and the enemy sprite is at the bottom of the screen, when the level begins, the collidesWith() method fires so the application show the game over screen as if the enemy touched the hero, which is not true.
    The second problem is that when I try to stop the threads. For example if the hero sprite dies, all of the threads which drives the enemies should stop, so the player needs to restart the level for try again the level. The problem is that when the levels restarts, some of the enemies doesn't move.
    Any of you know what the problem could be it?? I'll appreciate your quick answers. Thanks in advance.

    HI Friend:
    You install jdk1.5.try it!

  • Problems with J2ME and JAX-RPC

    Hi,
    I am trying to write a J2ME web service client. I have generated the stub classes with wscompile from the wsdl document at http://www.webservicex.net/stockquote.asmx?WSDL. However, when I try to run the MIDlet I always get the following error message:
    [wtkpreverify] Error preverifying class javax.xml.rpc.encoding.Serializer
    [wtkpreverify] java/lang/NoClassDefFoundError: java/io/Serializable
    I am using Eclipse 3.1, Antenna 0.9.13, the Web Service Development Kit 2.0 and the WTK 2.3 beta.
    The necessary jars (the WTK libs, rt.jar from the JRE, activation, mail, saaj and jax-rpc libraries from the WSDK) have been included in my classpath.
    Does anybody know how to fix this problem? Any help is much appreciated.
    Regards,
    Motivated

    Thanks, that was my mistake.
    Instead of using wscompile, you must generate the stub classes with the WTK. Then, you set a reference to the j2me-ws.jar (JSR-172). No additional libraries from the Web Service Development Kit are required.

  • Path problem with j2me wtk emulator tool

    i am trying to run a midlet that uses an optional package ('location' for
    GPS interface). When I compile the system sees the package and e'thing is
    fine. But when I try to run the midlet, I get 'NoClassDefFoundError'. I
    have tried adding the path to the emulator script but with no effect. And
    when I add the following code to see the run time paths being used, the
    system displays 'null':
    import java.util.Properties;
    System.out.println( System.getProperty( "java.class.path" ) );
    Thanks,
    Tom Arnall
    north spit, ca

    when using j2me, I added the following code to see the run time paths being used, and the system displayed 'null':
    import java.util.Properties;
    System.out.println( System.getProperty( "java.class.path" ) );
    is the 'class.path' key supported under j2me?
    thanks,
    tom arnall

  • Problem with Display.setCurrentItem() using J2ME-Polish

    Hi,
    I am fairly new to J2ME-polish and have encountered a situation that I am having a problem with. I am loading a form with a number of String Items. When I display the form I would like to focus to the last String Item that has been placed on the form. I have been using Display.setCurrentItem() in J2ME but when I try using it in J2ME-Polish I receive this message :"de.enough.polish.ui.Screen (3022): Screen: unable to focus item (did not find it in the container or is not activatable ) "
    Below is a snippet of my code.
            // si14 in a StringItem defined earlier in the code
            // It is the last stringItem placed into the form
            form.append(si14);
            display = Display.getDisplay(this);
         display.setCurrent(form);
         display.setCurrentItem(form.get(0));Thanks

    http://forums.sun.com/thread.jspa?threadID=686256&messageID=10864566

  • Image problem with my palm (J2ME Wireless Toolkit)

    Hi,
    I did a basic application. I just show an image and it works perfectly with the J2ME Wireless ToolKit.
    However, when I create the package, convert it and send it on my palm, everything is ok, except the image. It won't appair.
    I get an exception that the image couldn't be found, but when I use the emulator, everything is ok !!!
    The image is in the "res" directory, like it was asked in the manual.
    I tought that everything is encoded (text file or image file) when you create the package. If it's working with the emulator, why is it not working on my palm?

    I had a same problem with my nokia 3650 in J2me the image appears but not on the phone, I think that that is a bug and fixed it this way:
    when you make a jar package, unpack package with winRAR or some archive program in some temp directory and in that directory make a res directory an put the image in it, then repack theese files again including the res directory in a new jar file. It works for me. It looks that J2ME in compiling doesn't change the path, to root but leaves the res directory.

  • How to set up on device debuging with J2ME SDK 3.0 and window mobile 6.5?

    I got some infomation about setting up on device debuging in J2ME SDK 3.0 with real device(e.g samsung windown mobile B7330). When I start debuging on device, I got exception when open RMS
    javax.microedition.rms.RecordStoreException: error opening record store fileHere my code:
    public void saveProfile() {
            byte[] data = toByteArray();
            try {
                rs = RecordStore.openRecordStore("kunkunProfile", true);
                for (RecordEnumeration e = rs.enumerateRecords(null, null, false); e.hasNextElement();) {
                    int id = e.nextRecordId();
                    rs.deleteRecord(id);
                rs.addRecord(data, 0, data.length);
                rs.closeRecordStore();
            } catch (Exception ex) {
                System.out.println("Exception in OpenRecordStore..." + ex.getMessage());
                try {
                    rs.addRecord(data, 0, data.length);
                    rs.closeRecordStore();
                } catch (Exception e) {
                ex.printStackTrace();
        }Anybody help me? I am stuck here.

    Hi dominikg,
    At first, You can try to restart the device-manager from system tray.
    If it doesn't help, then try the following:
    - stop the device manager
    - Remove c:\Docement and Settings\<your User>\javame-sdk folder.
    - Ran the device manager from <SDK>/bin directory
    - try to debug again.
    Did you tried to change port 51307 to another.
    Early access build had some problems with device manager, I hope that final release will be better :)
    BR,
    Igor

  • Error while trying to debug on windows mobile 6.1  with j2me SDK 3.0 ea

    Hi,
    I tried to debug a simple application today. It works fine with the emulator but debug fails to connect to the device.
    I followed the steps described in the userguide of 3.0.
    host operating system: windows xp sp3
    device: htc touch pro
    device operatiing system: windows mobile 6.1 professional
    The device is listed in the device selector of the SDK as Touch_Pro
    The device is connected and active sync is running (i can explore the phone using windows explorer)
    sun-java-cldc-emu.cab has been installed on the device and is running
    When i try to debug the application from the SDK or netbeans 6.5(added 3.0ea as a platform) i get the following error:
    Starting emulator with port number 51307
    Cannot create device connection: Failed to connect to device 9!
    Result: 1
    I tried setting the loglevel to DEBUG in log4j config of the SDK, but thats it.
    Are there any other settings i can change to get more detailed output?
    Where do you report bugs/feedback for j2me SDK 3.0 ea?
    regards,
    dominikg
    Edited by: dominikg on Dec 11, 2008 8:36 AM
    -- changed topic title to 'error' instead of 'howto'
    -- added more specific questions

    Hi dominikg,
    At first, You can try to restart the device-manager from system tray.
    If it doesn't help, then try the following:
    - stop the device manager
    - Remove c:\Docement and Settings\<your User>\javame-sdk folder.
    - Ran the device manager from <SDK>/bin directory
    - try to debug again.
    Did you tried to change port 51307 to another.
    Early access build had some problems with device manager, I hope that final release will be better :)
    BR,
    Igor

  • Problems with russian characters

    I need to localize my application to russian language and i have problems with their special characters. I use Graphics.drawString method and unicode escape sequences and this works fine on phones like SE, Nokia and Siemens. But some phones are not able to display these characters (Motorola, Sharp, Samsung). Do u know any other way how to draw these characters on problematic phones listed above?
    thanx for any hint

    thanx for hint, but i'm not familliar with this stuff in j2me. could u described it in more details, please?

  • Problem with RecordStore

    Hi all!
    I am building my first cell phone application and starting with J2ME. I "finished" my implementation but my app is not working properly. I dont know if the data is really being saved on the RecordStore or if the data is not being loaded correctly.
    I have 3 classes: Interface, Data and DAOdata. I will put the main parts:
    //My Interface
    public class Interface extends MIDlet implements CommandListener {
    //In this part I save some data to DataBase
    formPagto.setCommandListener (new CommandListener() {
                public void commandAction(Command c, Displayable s) {
                       if(c == salvaDesp){
                            String tmp = txtVal.getString();
                            float val = Float.parseFloat(tmp);
                            DAOdadata dados = new DAOdata();
                            dados.carregaDados(mesAtual());
                            dados.saveData(val, option, mesAtual());
                            novoDisplay(mList);
                       if(c == cBack)
                            novoDisplay(mListSec);
    //Here I load data from RecordStore. The problem, is that only 0 comes out
    mListMes.setCommandListener (new CommandListener() {
                public void commandAction(Command c, Displayable s) {
                  if(c == cResumo){
                       int x = mListMes.getSelectedIndex();
           DAOdata dados = new DAOdata();
           Data VR;
           VR = dados.loadData(x);
       //In this place all I get is 0%. And this is the problem. I should get different values.
           StringItem alim = new StringItem("Food: ", FloatToString(VR.getFood())+"%");
           StringItem vest = new StringItem("Health: ", FloatToString(VR.getHealth())+"%");
            fromVis.append(alim);
           fromVis.append(vest);
         Display.getDisplay(this).setCurrent(fromVis);
                  else if(c == cBack)
                       novoDisplay(mList);
    //My Data class. It´s a bean
    public class Data {
         private float salary;
         private float food,healty,cars, groceries;
    //Setters
    public void setSalary(float val){
              salary = val;
    //Getters
    public float getSalary(){
      return salary;
    //Finally my DAO class
    public class DAOdata {
    private RecordStore rs = null;
    Data dados;
    int month;
    public void loadDataBase(){
              try
                rs = RecordStore.openRecordStore(PERFIL_DB, true);
             catch (Exception  e){
                  System.out.println("Problem loadDataBase()");
    //Load data from RecordStore
    public Data loadData(int month){
              try{
               byte[] data = rs.getRecord(month);
               DataInputStream is = new DataInputStream(new ByteArrayInputStream(data));
               dados.setFood(is.readFloat()); 
               dados.setHealth(is.readFloat());       
               dados.setCars(is.readFloat());
               dados.setGroceries(is.readFloat());
               is.close( );
              }catch(Exception e){
                        //Never get exceptions in here
                   e.printStackTrace();
              return dados;
    //Saving data to RecordStore.
    public void saveData(float val, String tipo, int month){
              if(tipo.equals("Food")){dados.setFood(val);}
              else if(tipo.equals("Health")){dados.setHealth(val);}
              else if(tipo.equals("Cars")){dados.setCars(val);}
              else if(tipo.equals("Groceries")){dados.setGroceries(val);}
              try{
               ByteArrayOutputStream baos = new ByteArrayOutputStream( );
               DataOutputStream os = new DataOutputStream(baos);
               os.writeFloat(dados.getFood());
               os.writeFloat(dados.getHealth());
               os.writeFloat(dados.getCars());
               os.writeFloat(dados.getGroceries());
               os.flush();
               os.close( );
               byte[] data = baos.toByteArray( );
              rs.setRecord(mes, data, 0, data.length); //I use setRecord since the data is already initialized
               rs.closeRecordStore();
              }catch(Exception e){
                        //Never get exceptions in here
                   e.printStackTrace();
    //In this method I populate the RecordStore for the First time. I call this method 12 times, one per month
    public void initRecordStore(int month){
              dados.setFood(0);
              dados.setHealth(0);
              dados.setCars(0);
              dados.setGroceries(0);
              try{
                    ByteArrayOutputStream baos = new ByteArrayOutputStream( );
                    DataOutputStream os = new DataOutputStream(baos);
                    os.writeFloat(dados.getFood());
                    os.writeFloat(dados.getHealth());
                    os.writeFloat(dados.getCars());
                    os.writeFloat(dados.getGroceries());
                    os.close( );
                    byte[] data = baos.toByteArray( );
                   int id = rs.addRecord(data, 0, data.length);
                   rs.closeRecordStore();
                   }catch(Exception e){
                        //Never get exceptions in here
                        e.printStackTrace();
         }So, all that I get are 0% as a result. I dont get any exceptions when I load or save data. I dont know how to solve it. Any help will be welcome.
    Thank you all

    Hi, thanks for your answer.
    Actually I have seen a lot of examples before using the RecordStore.
    Maybe my problem is the way I am using the loadData() to retrieve information to another class. I am trying in a different way.
    Anyway, I will check more examples.
    Thank you =)

  • Problems with the conection of acess db with midlet

    hey there,well its good to knw that u ppl have expirience in j2me.well , im having problem with the connection of access db with j2me.could you brief me on what exactly i should do in order to do connect it to run a query and save some info into the db frm the midlet,
    thanx.

    As I said earlyer today, just a few topics back, you can't do that. Read here:
    http://forum.java.sun.com/thread.jspa?threadID=615921&tstart=0
    Could you people please use the search option! Answering the same questions over and over is realy boring (specially if they pop up several times a day)..

  • Problem with the agent console created in the ESSO-Logon Manager 64 bits

    Friends,
    When I use the installer that I created in the console ESSO-Logon Manager for 32-bit, this I install it on the client side and when I synchronize with the console-Logon Manager ESSO brings me and I can see the agent all the templates I configured.
    I have a problem with the agent console created in the Logon Manager ESSO-64bit.
    When I use this installer on the client stations and then by the agent does not envision the applications that I have configured in the console.
    This causes you can not do single sign on to applications that I have configured in the client stations
    To generate this installer use the source name: ESSO-LMx64.msi
    Can someone please help me with this problem, this only happens when I use the msi installer on 64-bit client stations.
    Thanks.

    Jackson_Bill wrote:
    What IDE are you using and what platform?Read first.
    Moh Bob wrote:
    I'm using J2ME platform SDK 3.0
    db

  • Problem with contact list in email w/ 3.0

    After upgrading to 3.0 I'm having a problem with the "To" in emails. I start typing in a name in the "To" field and it does not bring up matching entries in my contact list (it used to do so with the previous version SW).
    I have to try to send the email at which time an error message comes up. I have to cancel the send, delete the name in the "To" field and type the name in again. The second time it brings up the contact list and eveything works fine.
    Anyone else having this problem?

    Jackson_Bill wrote:
    What IDE are you using and what platform?Read first.
    Moh Bob wrote:
    I'm using J2ME platform SDK 3.0
    db

  • Problem With Downloading Wireless Toolkit.

    I`ve problem with downloading the j2me wireless toolkit, i`ve tried to downloading it for 3 weeks but i couldn`t, so i`m searching for some mirror sites for this package and couldn`t find anything.Can You Suggest me a mirror site for Dl ing this package PLZ?

    I found that mpp sdk works well, it may not be what your looking for but Its worth looking at I think.
    http://www.mpowerplayer.com/

  • Help with J2ME streaming

    Hi,
    My name is Constantinos Loizou and I am a student and currently developing a project for my Master's degree.
    I need to stream audio and/or video to a PDA device. There is a trick here which is:
    The PDA must receive the stream from a multicast address. For this I have implemented a Bridge application which joins the multicast group on behalf of the PDA and receives the Multicast RTP packets (which are sent from JMStudio) and Unicasts them to the PDA.(HP iPAQ) I had no problem implementing this. The streaming is done using JMStudio player which encodes the streaming audio data into a number of encodings (DVI/RTP in my case). I choose DVI/RTP and stream a .wav audio file.
    Now I have to accept the packets and play the stream on the PDA.
    The j2me application receives all the RTP packets successfully and I can extract usefull information from the packets such as: Timestamp, sequence number, payload type. The payload type is 5 which means it is a DVI4 encoding therefor the packets are accepted without any problem. I then save the data of the packet into a byte[] array and in regular intervals (50 000 bytes) I load them into a new ByteArrayInputStream(buffer); When I try to load the BytearrayInputStream and open it with a player I get the following error message:
    javax.microedition.media.MediaException: Failed to realize Player: Malformed wave media: expected 'RIFF'
    at com.sun.mmedia.WavPlayer.doRealize(+160)
    at com.sun.mmedia.BasicPlayer.realize(+84)
    at src.ViewVideoCanvas.run(ViewVideoCanvas.java:112)
    The command I run is: player = Manager.createPlayer(input, "audio/x-wav");//create new player
    And the error occurs on player.realize();
    I believe that this happens beacause the data is encoded to DVI/rtp. I have searched a lot and found the algorithm of decompressing the DVI data but again I get the same error
    Anyway, this is a brief description of my problem and I hope you can help me.
    Contact me for any more details or help you can provide (code sammples, decoding algorithms and implementations in java)
    Thank you
    Constantinos Loizou

    Hi my name is shaun benjamin and I am sorry I dont have the solution to this problem but could you please do me a fovor. I am looking for j2me source code for an audio streaming midlet tha can stream mp3 or wav. Could you please kindly send me some source code because I am not too fimiliar with j2me and am learning.

Maybe you are looking for

  • Error in HUMO transaction only in Spanish language?

    Hi friends, in transaction HUMO, if I use selection parameter 'System status', to be more precise, if I give it the value 'I0517' (LOCK) and I enter a Handling Unit which has this status, the report finds this HU. Nevertheless, if I logon in Spanish

  • Changing Acrobat 9 pro extened Japanese Version to English Settings

    I have purchased a Japanese Acrobat 9 pro extended for the Japanese capabilities but would like to have the settings and tool bars in English is this possible? Thank you...

  • Help with Lightroom 4.4!

    Several hundred RAW files were deleted from my hard drive. I had done a lot of editing and processing on them ready for delivery when it happened. They show up in Lightroom 4.4 as missing files but the settings, metadata, and star rating are still th

  • Is the Sony HDR-FX7 HDV Camera compatible with Final Cut Pro 5 or 6?

    Has anyone gotten this to work correctly. I have read in a few forums that the camera is not supported by FCP and I checked on the compatibility list and it is not there. iMovie sees this camera and can capture from it. I can not get FCP 6 to recogni

  • Cannot connect to iMessages & Facetime since 10.8.3 update

    I've updated OSX to 10.8.3 yesterday. Since then I  cannot connect to Messages or Facetime anymore using my normal Apple Id > get "The server encountered an error processing registration. Please try again later." message I've repaired HD authorizatio