Problem in placing the command

I am developing an application in J2ME. In the midlet I have just added an Exit command and one canvas. But the problem is that the Exit command is coming under Menu. I want it to be displayed as Exit only not under menu. Can you tell me how to overcome this? I am giving you the midlet code.
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class GujiMain extends MIDlet {
     private MainMenuCanvas mainMenuCanvas;
     public GujiMain() {
          mainMenuCanvas = new MainMenuCanvas();
     protected void destroyApp(boolean unconditional)throws MIDletStateChangeException {
     protected void pauseApp() {
     protected void startApp() throws MIDletStateChangeException {
          Displayable d = mainMenuCanvas;
          d.addCommand(new Command("Exit", Command.EXIT, 1));
          d.setCommandListener(new CommandListener() {
               public void commandAction(Command c, Displayable d) {
                    notifyDestroyed();
          Display.getDisplay(this).setCurrent(d);
}

Hi Dhiraj1983.
Your code seems to be OK. But some devices display commands under menu, some other directly. I think that is impossibile to choose this behaviour.
Regards

Similar Messages

  • Problem in placing the EJB queries

    Hi all,
    I am working on the migration of an application from J2EE to SAP WAS.
    The original application contains some EJB queries present in the file sun-j2ee-ri.xml.
    Entery for one of the query is given below:
    <ejb20-cmp>
    <sql-statement>
    <operation>storeRow</operation>
    <sql>UPDATE "UserEJBTable" SET "password" = ? WHERE "userName" = ? </sql>
    </sql-statement>
    <sql-statement>
    <operation>findByPrimaryKey</operation>
    <sql>SELECT "userName" FROM "UserEJBTable" WHERE "userName" = ? </sql>
    </sql-statement>
    </ejb20-cmp>
    I cannot understand where(in which file) to make entry for this query.
    Please help me out with this problem.

    Hi Neethu ..
        can u create one more finderMethod in ur EJB?.
    then that will be dislayed in the persistent.xml files.
    u can select that findermethod from Query subtab , and write ur own queries there..
                      not sure , u can overwrite the standard  finderMethod..
                                      Regards
                                      Kishor Gopinatha

  • Problem in placing the background in ALV Grid display

    I have created one image of the business flow, and it have to be displayed in the background of ALV grid display.
    For this I have gone to T.Code –<b>OAER</b> , Given class name as <b>PICTURES</b> , Class type as <b>OT</b> , Object Key <b>BACKGROUND</b>, clicked on the triangle of Standard Doc , then double click on screen, and finally uploaded the background into SAP.
    In the function module <b>‘REUSE_ALV_GRID_DISPLAY’</b> I passed this background to the parameter I_BACKGROUND_ID.
    It is working fine, and I was able to see the back ground in my program.
    (developed in IDES)
    But the same is not working in my development client, will some one suggest be the reason for the problem. Please kindly help me out from this problem.

    hello Dinesh,
    I have created the object key in the development client itself and used in the grid display of the same client. i am not understanding where the problem is, any how thank you very much for your responce. if you have any other solution please let me know.
    Thank you

  • Problem in Placing the file in  Archive directory

    Hi,
    I am trying to read a file and after processing , I want to archive and place in other directory. Though i am able to read and insert the data succesfully into database but not able to place in 'Archive' Directory.
    What might be the reason any idea???
    I heard there is a bug in 10.1.3.3.0 version... Is this true???
    Any help in this regard would be appreciated.
    Thanks,
    Pallavi
    Message was edited by:
    user614169
    Message was edited by:
    user614169

    I don't think there is a bug related to this in 10.1.3.3
    I am using SOA and JDeveloper 10.1.3.3 and its working fine
    Are u checking the archive option in file adapter?( Check wsdl for entry)
    Also are you giving the physical location or logical one?
    try with physical path if u are not doing it already.
    And also, i don't think files get archived after processing, they get archived at the same time the file adapter is in action.
    Regards
    Ketan

  • Problem in placing files in server

    Hello,
    I am working on applet to servlet communication. I have developed the code but I have problem in placing the files in the tomcat server. these are my files
    test.html
    test.class (applet)
    inter.class (bean implementing serializable interface)
    testser.class (servlet)
    I have placed test.html, test.class and inter.class in webapps/examples folder. I have placed testser.class in webapps/examples/web-inf/classes folder.
    So that i can now see the applet and applet pass values to bean. But my servlet is not called. Can any one help what is going wrong or where should i place the files?
    Thanks

    Hello,
    Here goes my source code files. All of them are working source files,
    I am a bit confused in placing them in the Tomcat server. Can anyone try and post the results please?
    i.e placing the files in the proper directories of the server.
    // Register.java
    import java.sql.*;
    public class Register implements java.io.Serializable
        // data members
        private String firstname;
        private String lastname;
        private final String CR = "\n";     // carriage return
        // constructors
        public Register()
        public Register(String afirstName, String alastName)
            firstname = afirstName;
            lastname = alastName;
              RegistrationServlet regser = new RegistrationServlet();
         public String getFirstName()
                 System.out.println("In getFirstName(): " + firstname);
              return firstname;  
        public String getLastName()
            return lastname;  
    // RegistrationApplet.html
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.awt.event.*;
    import java.io.*;
    public class RegistrationApplet extends Applet implements ActionListener
         String browser;
         public void init()
              setLayout(null);
              setSize(438,536);
              label1.setText("First Name*:");
              add(label1);
              label1.setFont(new Font("Dialog", Font.BOLD, 12));
              label1.setBounds(48,60,116,27);
              add(textField1);
              textField1.setBounds(168,60,180,30);
              add(textField2);
              textField2.setBounds(168,96,180,30);
              label2.setText("Last Name*:");
              add(label2);
              label2.setFont(new Font("Dialog", Font.BOLD, 13));
              label2.setBounds(48,96,94,20);
              button1.setLabel("Submit");
              add(button1);
              button1.setBackground(java.awt.Color.lightGray);
              button1.setBounds(120,444,98,30);
              label11.setText("Applet to Servlet Communication");
              add(label11);
              label11.setFont(new Font("Dialog", Font.BOLD, 24));
              label11.setBounds(108,12,288,36);
              button1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              if(ae.getSource().equals(button1))
                   firstname = textField1.getText().trim();
                   lastname = textField2.getText().trim();
                   try{
                   String toservlet = "http://localhost:8080/servlet/RegistrationServlet";
                   URL servleturl = new URL(toservlet);
                   URLConnection servletconnection = servleturl.openConnection();
                   servletconnection.setDoInput(true);
                   servletconnection.setDoOutput(true);
                   servletconnection.setUseCaches(false);
                   servletconnection.setDefaultUseCaches(false);
                   servletconnection.setRequestProperty("Content-type","application/octet-stream");
                   // sending the values to the serialised class "Register.java"
                   register  = new Register(firstname,lastname);
                   ObjectOutputStream outputtoservlet = null;
                   outputtoservlet = new ObjectOutputStream(servletconnection.getOutputStream());
                   outputtoservlet.writeObject(register);
                   outputtoservlet.flush();
                   outputtoservlet.close();
                   catch(Exception e)
                        System.out.println("in submit  "+e);
                        e.printStackTrace();
         String firstname;
         String lastname;
         java.awt.Label label1 = new java.awt.Label();
         java.awt.TextField textField1 = new java.awt.TextField();
         java.awt.TextField textField2 = new java.awt.TextField();
         java.awt.Label label2 = new java.awt.Label();
         java.awt.Button button1 = new java.awt.Button();
         java.awt.Label label11 = new java.awt.Label();
         String parameters;
         Register register = null;
    // RegistrationServlet.java
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    public class RegistrationServlet extends HttpServlet
         public void doPost(HttpServletRequest req,HttpServletResponse res)
              ObjectInputStream inputFromApplet = null;
            Register aRegister = null;       
              try
                   inputFromApplet = new ObjectInputStream(req.getInputStream());
                   //"Reading data..."
                   System.out.println("Reading Data.......");
                 aRegister = (Register) inputFromApplet.readObject();
                   System.out.println("Completed Reading Data.......");
                   //close the connection after reading the data               
                   inputFromApplet.close();
                   // getting parameters from the serilized class "Register.java"
                   String first = aRegister.getFirstName();
                   String last = aRegister.getLastName();
                   ServletOutputStream sos = res.getOutputStream();
                   sos.println("First Name:"+first);
                   sos.println("Last Name:"+last);
              catch(Exception e)
                   System.out.println("in doPost()  "+e);
                   //e.printStackTrace();
    }Thanks

  • How To Parse The Command Line?

    Hello,dear. When I writing a C/S mode application,which performing download and upload files between the FTP server and the clients, I encountered the problem of parsing the command line.
    I intend to download file from the server side ,using this following format ,which is composed by four arguments:
    ftp>receive server's IPaddress portnumber filename
    The problem is I don't know how to parse the command line and store them to some objects and using it.
    I'm right here waiting for the nice problem-shooter.
    Thanks for reading my poor expression.

    In your console application main class
    public static void main(String[] args)
    // code
    args is a sting array with the command
    line itemsI think you missed the point or forgot the ":-)". This is the "Socket", not the "New to Java" forum.

  • How do I change my password on the command line?

    How does a user change their password on the command line in 10.4? This user is not an admin. I can try "passwd" and it asks for my old password, and then new password. Then it just says "Sorry" and does not change my password.
    Thanks!

    Is the user able to change the password from "System Preferences" > "Accounts" - i.e is the problem specific to the command line? If the user is unable to change their password at all, and the Mini has an Intel processor, they may be affected by the issue described here:
    http://docs.info.apple.com/article.html?artnum=304703
    Other users have posted here indicating that reinstalling the 10.4.8 update using the "combo" updater as suggested in the article has resolved the issue for them...

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • Excel won't open and error message There was a problem sending the command to the programe

    Hi there
    I'd be grateful for your help.
    I've just bought a new laptop and installed Office 2013.  I used Excel 2013, did what I needed to do and saved it.  This was 5 days ago.
    Today, I've tried opening the file from my desktop and get the error message 'There was a problem sending the command to the program'.
    And when I try to open Excel to do the DDE fix, which seems to be the best suggestion, I can't open Excel at all.  I've tried to get into it from the Apps screen.
    Any help would be gratefully appreciated.
    Thanks

    Don't seem like this can be fixed so I went back to version 6.0.2 which works good.
    I have Chrome now as my default browser and will not use fire fox until they fix it!
    Chrome works great!

  • Could not complete the command because of a problem using the Adobe Color Engine

    Hi all
    This bizarrely started this morning - completely out of the blue - and I've no idea why.
    Setup: Mac 10.8.2 / Creative Suite Premium PhotoShop CS5 extended (patched to 12.04)
    Am working on images exported from LightRoom 4 (16bit A3 Pro Photo RGB PSDs) in PhotoShop CS5.
    As part of my image grading process I have a PhotoShop Action that does the following: copy layer to new document (document respects all of copied layer settings) > Image > Adjustments > HDR toning > apply a certain HDR preset > copy to resultant image back to original doc > set opacity as 40%.
    Totally out of the blue, after having this action for about 2 months, this morning I start getting a warning dialog of "Could not complete the command because of a problem using the Adobe Color Engine" and the action fails. The failure seems to take place at the 'make document' part of the action and seems to somehow be related to the contents of the clipboard.
    I've tried trashing and re-creating the action. It works first time out fine and then - on the next image - errors again.
    At present I can only safely carry out the work 'manually' by completing all the actions myself.
    I can think of no settings that have changed and the OS hasn't been updated in a while.
    I have found one other thread on a similar problem in PhotoShop Elements, but no definitive solution.
    Any help appreciated as I have a shedload of stuff to process.
    Best wishes
    TP

    OK: trash of prefs didn't work. Tried thrice. Re-created orig action. same problem.
    BUT!
    Your 'Image > Duplicate' suggestion does seem to work. If I use that in a new action as the method for creating the HDR version doc (instead of 'Select > Copy > New > Paste), it seems to work.
    Will try that out this afternoon, but for now: WIN!
    Many thanks for the suggestion!
    TP

  • Using Firefox 4 & Windows 7. Everytime I start Firefox from a shortcut to a website it comes up with the following error 'there was a problem sending the command to the program'. The requested website does load after this. with no problems.

    Using Firefox 4 & Windows 7. Everytime I start Firefox from a shortcut to a website it comes up with the following error 'there was a problem sending the command to the program'. The requested website does load after this. with no problems.
    If a shortcut is used while Firefox is already open the error does not occur.

    As reported in earlier replies, the annoyance disappeared after I upgraded to Roboform 7.5.6, from 7.5.4.
    Regards, Steve

  • Word2007 in windows 7 -There was a problem sending the command to the program!

    I just bought my new HP laptop with windows 7 Home premier edition, and then I installed windows office 2007 suite. It's ok if I only open the word without any existing word file. But if I open word with a word file, it says " there was a problem sending
    the command to the program". I try this action under safe mode, it's no problem, I can open an existing word file. If I open the winword.exe and use menu "file-open" to open a word file, it's alright. But If I double click a word file, it shows that error.
    I tried to change the registry information according to the solution on internet, but it doesn't work.  I checked the compatibility mode, it says run in "windows XP sp3", and it is grey, I can't uncheck it.
    Anyone got any idea to fix this problem?
    Thanks a lot.

    Hi
    Thank you for using
    Microsoft Office for IT Professionals Forums.
    From your description, This sounds like a problem with the file associations in Windows.. If there is any misunderstanding, please feel free to let
    me know.
    The first thing to check is to make sure that the file extensions are correctly associated with Word.
    1.      
    Click Start > type or copy following command to the Search box
    "C:\Program Files\Microsoft Office\Office12\winword.exe" /unregserver
    2.      
    You should then, immediately, use the following command:
    "C:\Program Files\Microsoft Office\Office12\winword.exe" /regserver
    Re-associate the Word file  manually:
    Please go to
    Start \Control Panel\Programs\Default Programs\Set Associations.
    Locate the files .doc, .docm,.docx, .dot, .dotm, check if there are associated with
    Microsoft Word. If not, highlight the file and click the
    Change Program button. Choose Microsoft Word from the list. If you are unable to see Microsoft Word from the list, click the
    Browse button. Browse to the folder: C:\Program Files\Microsoft Office\Office12, and choose
    WINWORD.EXE.
    Click
    OK to save the settings.
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything
    I can do for you, please feel free to let me know.
    Hope that helps.
    Sincerely
    William Zhou CHN
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    No you just need to turn on Tap to Click. Go into System Preferences - Trackpad and click the Point to Click tab and select the first box which will say Tap to Click and you should be in business.

  • When I open Firefox 4 RC1 by clicking an external link (as from my desktop) I get an error: "there was a problem sending the command to the program"

    A box with this error: "there was a problem sending the command to the program" always pops up upon clicking any URL sitting in my desktop (or from any other folder). It will not happen if Firefox is already open. However, it is only an annoyance as the page fully opens with no problem.
    It started after I downloaded Firefox 4 beta ver 12. It continued after upgraded with RC1. It did not happen in my latest version of Firefox 3.6.x which I removed after installing 4 RC1

    This has happened to me many times but on the older FF 3 It could be a small bug, One should list the PC's being used as it could be related? Mine is an E-Machine Mod, W3609 running W7.

  • When going to a website from the desktop I get the followi ng message. "There was a problem sending the command to the program" Even though I get this messge, it still connects with the website/

    When going from the desktop to a website, I get the following message. "There was a problem sending the command to the program" Even though I get this message, I still connect to the website.

    As reported in earlier replies, the annoyance disappeared after I upgraded to Roboform 7.5.6, from 7.5.4.
    Regards, Steve

Maybe you are looking for

  • Please take a look? (Pong)

    Hello :) My friend is doing his thesis & he's stuck with this program. Apparently it's not compiling. Unfortunately I don't have Java installed on this comp (in work) so I'm not much use but I was hoping someone here could point him in the right dire

  • How to change the filename in @include file?

    I want to do a checking before deciding to include which file, for example, <% if(isValid){ %> <%@ include file="abc.jsp" %> <% else{ %> <%@ include file="def.jsp" %> <% } %>but the code above doesnt work in my JSPs any idea how to solve this? thanks

  • Inserting HTML/CSS in a Tabbed Panel

    I've been having trouble inserting HTML/CSS into a Tabbed Panel widget. In this case, the HTML/CSS is creating a text box with scroll bars (as described in an excellent workaround for getting scroll bars to work). Has anyone else come across this sit

  • Problem with File Sender

    Hi All, I'm using the sync-async bridge for the following scenario. An HTTP request(sync) is made to XI and the message is passed to the first receive step of a BPM. The BPM will send the message asynchronously to a business system which has a file a

  • Change scopre / Multiscope option regarding Server 2008 R2 With TMG2010 PPTP Site-to-Site VPN.

    Hey guys, Ive been looking through the forum for some answers regarding the next setup; Host with 2VM'S; DC and TMG Internal range is 192.168.100.x/24 Host02 with 2 VM'S;  DC02 and TMG02 Internal range is 192.168.200.x/24 Now im looking to expand DC0