ClassNotFoundException problem executing midlet

Hello,
I use Forte For Java and J2ME (midp,cldc).
I have those files in my package c:/ProjetJ2ME/src/HelloMIDlet :
HelloMIDlet.java
HelloMIDlet.class
HelloMIDlet.jar
HelloMIDlet.jad
// I declare the package in my java file : package HelloMIDlet
When I execute HelloMIDlet.jad (under Forte), the Gray phone appears and we can read the file name (HelloMIDlet) on the screen (Emulating).
But when I launch the program, a ClassNotFoundException appears :
Unable to create MIDlet HelloMIDlet.HelloMIDlet
java.lang.ClassNotFoundException: HelloMIDlet.HelloMIDlet
at com.sun.midp.midlet.Selector.commandAction(+47)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+152)
at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+427)
I think it comes from my pathes :
//autoexec.bat
PATH=C:\jdk1.3.1_02\bin;C:\jdk1.3.1_02\lib;
PATH=%PATH%;c:\j2me\midp1.0.3fcs\bin;c:\j2me\j2me_cldc\bin;
SET CLASSPATH=.;C:\j2me\midp1.0.3fcs\classes;
I tried to precise my jar file in the classpath :
SET CLASSPATH=.;C:\j2me\midp1.0.3fcs\classes;
SET CLASSPATH=%CLASSPATH%;C:\ProjetJ2ME\src\HelloMIDlet\HelloMIDlet.jar
But I always have my error !
Can it be a package problem, a classpath problem ... ?????
Thank you
(Excuse my english)

Actually, the problem is that way the .JAR is organized.
If you drop the package statement, everything will work.
If you insist on having the package specified, you need to have your files stored under the "HelloMIDlet" directory within the .JAR.
Jouster

Similar Messages

  • Problem executing midlet

    I launch a midlet with the j2me netbeans utility, but when I try to select (already in the mobile simulator), i get this error:
    Unable to create MIDlet ListDemo
    java.lang.ClassNotFoundException: ListDemo
            at com.sun.midp.midlet.MIDletState.createMIDlet(MIDletState.java:147)
            at com.sun.midp.midlet.Selector.run(Selector.java:151)I don't know if it is related to the code or if it is a common problem. I've tried searching on google and didn't get any feedback.
    Here's the code
    public class ListDemo
            extends MIDlet
            implements CommandListener {
        private final static Command CMD_EXIT =
                new Command("Exit", Command.EXIT, 1);
        private final static Command CMD_BACK =
                new Command("Back", Command.BACK, 1);
        private Display display;
        private List mainList;
        private List devList;
        private List roomList;
        private List specList;
        private boolean firstTime;
        public ListDemo() {
            display = Display.getDisplay(this);
            try{
                Hashtable deviceMap = getDeviceList();
                // this array defines the special actions
                String[] specArray = { "Dispositivos", "Habitaciones", "Modos" };
                // the string elements will have no images
                Image[] imageArray = null;
                devList = new List("Devices", Choice.EXCLUSIVE, fillDeviceList(deviceMap),
                        imageArray);
                devList.addCommand(CMD_BACK);
                devList.addCommand(CMD_EXIT);
                devList.setCommandListener(this);
                roomList = new List("Rooms", Choice.EXCLUSIVE, specArray,
                        imageArray);
                roomList.addCommand(CMD_BACK);
                roomList.addCommand(CMD_EXIT);
                roomList.setCommandListener(this);
                specList = new List("spec", Choice.MULTIPLE, specArray,
                        imageArray);
                specList.addCommand(CMD_BACK);
                specList.addCommand(CMD_EXIT);
                specList.setCommandListener(this);
                firstTime = true;
            }catch(IOException e){
                e.printStackTrace();
            }catch(XmlPullParserException xe){
                xe.printStackTrace();
         protected void startApp() {
              if (firstTime) {
                   // these are the images and strings for the choices.
                   Image[] imageArray = null;
                   try {
                        // load the duke image to place in the image array
                        Image icon = Image.createImage("/midp/uidemo/Icon.png");
                        // these are the images and strings for the choices.
                        imageArray = new Image[] {
                                  icon,
                                  icon,
                                  icon
                   } catch (java.io.IOException err) {
                        // ignore the image loading failure the application can recover.
                   String[] stringArray = {
                             "Dispositivos",
                             "Habitaciones",
                             "Especiales"
                   mainList = new List("Choose type", Choice.IMPLICIT, stringArray,
                             imageArray);
                   mainList.addCommand(CMD_EXIT);
                   mainList.setCommandListener(this);
                   display.setCurrent(mainList);
                   firstTime = false;
         protected void destroyApp(boolean unconditional) {
         protected void pauseApp() {
         public void commandAction(Command c, Displayable d) {
              if (d.equals(mainList)) {
                   // in the main list
                   if (c == List.SELECT_COMMAND) {
                        if (d.equals(mainList)) {
                             switch (((List)d).getSelectedIndex()) {
                             case 0:
                                  display.setCurrent(devList);
                                  break;
                             case 1:
                                  display.setCurrent(roomList);
                                  break;
                             case 2:
                                  display.setCurrent(specList);
                                  break;
              } else {
                   // in one of the sub-lists
                   if (c == CMD_BACK) {
                        display.setCurrent(mainList);
              if (c == CMD_EXIT) {
                   destroyApp(false);
                   notifyDestroyed();
         private String[] fillDeviceList(Hashtable map){
              Enumeration claves;
              String[] devices = new String[map.size()];
              claves = map.keys();
              for(int j=0;j<map.size();j++){
                   devices[j] = map.get(claves.nextElement()).toString();
              return null;
         private InputStream openUrl(String s) throws Exception {
              HttpConnection hc = (HttpConnection) Connector.open(s);
              return hc.openInputStream();
         private Hashtable getDeviceList() throws IOException,XmlPullParserException{
              DataInputStream dis = null;
              DataOutputStream dos = null;
              InputStream inputStream = null;
              Hashtable map = new Hashtable();
              try{
                   inputStream = openUrl("http://localhost:8084/WebApplication1/listDevices.do");
                   System.out.println("Despues de la conexi");
                   KXmlParser parser = new KXmlParser();
                   parser.setInput(new InputStreamReader(inputStream));
                   parser.nextTag();
                   parser.require(XmlPullParser.START_TAG, null, "devices");
                   System.out.println("devices...");
                   while(parser.nextTag() == XmlPullParser.START_TAG){
                        parser.require(XmlPullParser.START_TAG, null, "device");                    
                        String id = nextValue("device-id",parser);
                        String name = nextValue("name",parser);
                        String roomLocation = nextValue("room-location",parser);
                        String isAvaliable = nextValue("is-avaliable",parser);
                        String state = nextValue("state",parser);
                        map.put(id, name);
                        parser.nextTag();
                   parser.require(XmlPullParser.END_TAG,null,"devices");
                   parser.next();
                   parser.require(XmlPullParser.END_DOCUMENT,null,null);
              }catch(XmlPullParserException xe){
                   System.out.println("excepcion");
                   xe.printStackTrace();
              }catch(IOException e){
                   e.printStackTrace();
              }catch(Exception e){
                   e.printStackTrace();
              }finally{
                   try{
                        if (dis != null) dis.close();
                   }catch(IOException ignored){}
                   try{
                        if (dos != null) dos.close();
                   }catch(IOException ignored){}
                   return map;
    private String nextValue(String tagName, KXmlParser parser) throws XmlPullParserException, IOException {
         String string = null;
         parser.nextTag();
         parser.require(XmlPullParser.START_TAG, null, tagName);
         string = parser.nextText();
         parser.require(XmlPullParser.END_TAG, null, tagName);
         return string;
    }

    Hi,
    I had this problem in KToolbar which is the utility shipped with J2ME and what i had to do was make sure that KToolbar was looking for the main class to load, which in yours would be the ListDemo.class. i havn't used the netbeans utility but (if you can) make sure the main class is listed. (it might be in the project settings).
    Dex

  • Problem executing function

    Hi All,
    I have a problem executing a function in oracle 10g.
    I am getting an error while executing ....
    Here is a function along with the error i am getting:
    create or replace FUNCTION UnpackArray
    Source IN VARCHAR2 DEFAULT NULL,
    Delimiter IN CHAR DEFAULT ','
    RETURN reSourceArray0 PIPELINED
    IS
    SourceArray00 SourceArray0:=SourceArray0(NULL);
    TYPE REFCURSOR IS REF CURSOR;
    CURSOR0 REFCURSOR;
    DelLen int;
    Pos int;
    Cnt int;
    str int;
    LEN int;
    Holder VARCHAR2(220);
    BEGIN
    --Check for NULL
    IF Source is null or Delimiter is null THEN
    Return;
    END IF;
    --Check for at leat one entry
    IF RTRIM(LTRIM(Source)) = '' THEN
    Return;
    END IF;
    /*Get the length of the delimeter*/
    SELECT LENGTH(RTRIM(Delimiter)) INTO DelLen FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter)) INTO Pos FROM DUAL;
    --Only one entry was found
    IF Pos = 0 THEN
    BEGIN
    INSERT INTO UnpackArray_TBL
    ( Data )
    VALUES ( Source );
    return;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END IF;
    /*More than one entry was found - loop to get all of them*/
    SELECT 1 INTO str FROM DUAL;
    << LABEL4 >>
    WHILE Pos > 0
    LOOP
    BEGIN
    /*Set current entry*/
    SELECT Pos - str INTO len FROM DUAL;
    SELECT SUBSTR(Source, str, len) INTO Holder FROM DUAL;
    /* Update array and counter*/
    /* Update array and counter*/
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    /*Set the new strting position*/
    SELECT Pos + DelLen INTO str FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter), str) INTO Pos FROM DUAL;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END LOOP;
    /*Set last entry*/
    SELECT SUBSTR(Source, str, length(RTRIM(Source))) INTO Holder FROM DUAL;
    -- Update array and counter if necessary
    IF length(RTRIM(Holder)) > 0 THEN
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END IF;
    --Return the number of entries found
    Return; LOOP
    FETCH CURSOR0 INTO
    SourceArray00.Data;
    EXIT WHEN CURSOR0%NOTFOUND;
    PIPE ROW(SourceArray00);
    END LOOP;
    CLOSE CURSOR0;
    RETURN;
    END;
    Error is : Compilation failed,line 6 (12:13:25)
    PLS-00201: identifier 'RESOURCEARRAY0' must be declared
    Compilation failed,line 0 (12:13:25)
    PL/SQL: Compilation unit analysis terminated
    Regards,
    Smiley

    Hi,
    I have a problem executing this function. Pls help me solve this issue.
    ---------------------------------Function---------------------------------
    BEGIN
    EXECUTE IMMEDIATE 'DROP TYPE reSourceArray0';
    EXECUTE IMMEDIATE 'DROP TYPE SourceArray0';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    CREATE OR REPLACE TYPE SourceArray0 AS OBJECT(Data VARCHAR2(255));
    CREATE OR REPLACE TYPE reSourceArray0 AS TABLE OF SourceArray0;
    BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE UnpackArray_TBL CASCADE CONSTRAINTS';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    CREATE GLOBAL TEMPORARY TABLE UnpackArray_TBL(Data VARCHAR2(255)) ON COMMIT PRESERVE ROWS
    CREATE OR REPLACE FUNCTION UnpackArray
    Source IN VARCHAR2 DEFAULT NULL,
    Delimiter IN CHAR DEFAULT ','
    RETURN reSourceArray0 PIPELINED
    IS
    SourceArray00 SourceArray0:=SourceArray0(NULL);
    TYPE REFCURSOR IS REF CURSOR;
    CURSOR0 REFCURSOR;
    DelLen int;
    Pos int;
    COUNT_ADV int;
    START_ADV int;
    LENGTH_ADV int;
    Holder VARCHAR2(255);
    BEGIN
    --Check for NULL
    IF Source is null or Delimiter is null THEN
    Return;
    END IF;
    --Check for at leat one entry
    IF RTRIM(LTRIM(Source)) = '' THEN
    Return;
    END IF;
    /*Get the length of the delimeter*/
    SELECT LENGTH(RTRIM(Delimiter)) INTO DelLen FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter)) INTO Pos FROM DUAL;
    --Only one entry was found
    IF Pos = 0 THEN
    BEGIN
    INSERT INTO UnpackArray_TBL
    ( Data )
    VALUES ( Source );
    return;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END IF;
    /*More than one entry was found - loop to get all of them*/
    SELECT 1 INTO START_ADV FROM DUAL;
    << LABEL4 >>
    WHILE Pos > 0
    LOOP
    BEGIN
    /*Set current entry*/
    SELECT Pos - START_ADV INTO LENGTH_ADV FROM DUAL;
    SELECT SUBSTR(Source, start_, length) INTO Holder FROM DUAL;
    /* Update array and counter*/
    /* Update array and counter*/
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    /*Set the new starting position*/
    SELECT Pos + DelLen INTO START_ADV FROM DUAL;
    SELECT INSTR(UPPER(Source), UPPER(Delimiter), START_ADV) INTO Pos FROM DUAL;
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END;
    END LOOP;
    /*Set last entry*/
    SELECT SUBSTR(Source, start_, LENGTH(RTRIM(Source))) INTO Holder FROM DUAL;
    -- Update array and counter if necessary
    IF LENGTH(RTRIM(Holder)) > 0 THEN
    INSERT INTO UnpackArray_TBL
    VALUES ( Holder );
    OPEN CURSOR0 FOR SELECT * FROM UnpackArray_TBL;
    END IF;
    --Return the number of entries found
    Return; LOOP
    FETCH CURSOR0 INTO
    SourceArray00.Data;
    EXIT WHEN CURSOR0%NOTFOUND;
    PIPE ROW(SourceArray00);
    END LOOP;
    CLOSE CURSOR0;
    RETURN;
    END;
    --------------------------------Error i am getting--------------------------
    "Parameter 'RETURN_VALUE': No size set for variable length data type: String."
    Thanks and Regards,
    Smiley

  • Problem executing a sql query in 10g environment

    Hi,
    I am having problem executing the following sql query in 10g environment. It works fine in 8i environment.
    I tried to_number(to_char) and it did not work.
    **A.APPL_ACTION_DT >= TO_CHAR("&v_strBeginStatusDate&", 'DD-MON-YYYY') AND A.APPL_ACTION_DT <= TO_CHAR("&v_strEndStatusDate&", 'DD-MON-YYYY')))**
    Any suggestions..
    --Pavan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I would be surprised if that worked in 8i as posted, although I no longer have 8i to test. You do not tell us the error message you are getting, but there are several things wrong with what you posted.
    First, the substitution variable requires only the & at the beginning, you have one on each end of your string, the one at the end will remain in the string that is passed to the database.
    Second, you cannot TO_CHAR a string with a date format as you are trying to do. The TO_CHAR function is overloaded and has two basic forms TO_CHAR(date, format_model) and TO_CHAR(number, format_model). Note that neither takes a string. It would appear that at least current versions of Oracle choose the second signature unless specifically passed a date datatype.
    SQL> select to_char('&h', 'dd-mon-yyyy') from dual;
    Enter value for h: 12
    old   1: select to_char('&h', 'dd-mon-yyyy') from dual
    new   1: select to_char('12', 'dd-mon-yyyy') from dual
    select to_char('12', 'dd-mon-yyyy') from dual
    ERROR at line 1:
    ORA-01481: invalid number format modelalthough I suspect that the error you are getting with your posted code is more likely to be ORA-01722: invalid number.
    Depending on the data type of appl_action_date, you are probably lokoing for TO_DATE instead of TO_CHAR.
    John

  • Oracle 11gR2 to SQL Server 2008 R2 - Problem executing SP on SQL server

    Hi,
    I have this problem: Executing a sp in SQL server from oracle
    --------------------ORACLE SP--------------------
    create or replace
    PROCEDURE DRIVER_SP
    AP IN OUT appl_param%ROWTYPE
    as
    v_sp_name varchar2(50);
    v_control_id number;
    val VARCHAR2(100);
    cur INTEGER;
    nr INTEGER;
    BEGIN
    v_sp_name := ap.MESSAGE_MISC_TEXT;
    v_control_id := ap.control_id;
    cur := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@dblink_sqlserver;
    DBMS_HS_PASSTHROUGH.PARSE@dblink_sqlserver(cur, 'execute ' || v_sp_name || ' ' || to_char(v_control_id));
    LOOP
    nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@dblink_sqlserver(cur);
    EXIT WHEN nr = 0;
    DBMS_HS_PASSTHROUGH.GET_VALUE@dblink_sqlserver(cur, 1, val);
    END LOOP;
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@dblink_sqlserver(cur);
    driver_ap01_log_msg('Procedure returned: ' || val);
    commit;
    exception
    when others then
    driver_ap01_log_msg(sqlerrm);
    END DRIVER_SP;
    --------------------SQL Server SP-----------------------
    ALTER PROCEDURE [dbo].[PA01_SP]
    @control_id integer
    AS
    begin
    --update PA01
    --set infile_control_id = @control_id
    --insert into dbo.PA01LOG(msg) values('test')
    select 0
    end
    THE PROBLEM: Oracle SP calls SQL Server SP and any time I try to INSERT/UPDATE/DELETE (DML) within SQLServer SP it throws an exception on Oracle's end. Once I comment all DML code the proc runs fine.
    +"ORA-28511: lost RPC connection to heterogeneous remote agent using SID=ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxx)(PORT=1511))(CONNECT_DATA=(SID=dg4msql)))+
    +ORA-02063: preceding line from DBLINK_SQLSERVER"+
    Please help.
    Thanks

    Thanks for your response, it got me closer to my goal. I'm still facing one problem:
    Let me explain what I need to achieve
    Purpose
    Execute an Oracle stored procedure which in turn executes a stored procedure on remote SQLServer which updates local tables on that SQLServer.
    Observations
    The execution of both procedures completes successfully. However, an explicit COMMIT statement must be issued on the Oracle session which initiated the transaction before any data could be read from the SQLServer updated table.
    The following is test exercise for proof of concept.
    PL/SQL code
    declare
    out_arg integer;
    ret_val integer;
    begin
    out_arg := 0;
    ret_val := "dbo"."ZZZ_SP"@DBLINK_SQLSERVER(10, out_arg);
    dbms_output.put_line(to_char(out_arg));
    end;
    SQLServer code
    ALTER procedure [dbo].[ZZZ_SP] (@arg1 integer, @arg2 integer output)
    AS
    begin tran tran1
    insert into dbo.PA01LOG(msg) values('ddd')
    commit tran tran1
    set @arg2 = @arg1 * 100
    select -1
    GO
    I have put the Oracle gateway in Single_Site mode to avoid two phase commit. I want SQLServer to be able to run its own transaction management. I don't want Oracle to be responsible for completing the transactions which take place within SQLServer.
    I fear there might be a gap in my knowledge.
    Any ideas why I need to issue a COMMIT in Oracle session to release the lock from SQLServer table?
    Thanks

  • Problem executing .bat file from within Java class

    I'm stumped: I have no problem executing a .bat file that sets classpaths and executes a Java jar, but when I try to execute other executables first and then the .jar, my application hangs and since the DOS box doesn't come up over my GUI, I can't see what's going on.
    This works:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\omni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat 'omni.bat'
    set JAVA_HOME=c:\j2sdk1.4.2_04\bin
    %JAVA_HOME%\java -jar C:\CS47AUXS\OMNILOADJAR\OmniLoad.jar
    This doesn't work:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\jobomni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat file 'jobomni.bat'
    SET NETX_HOME=C:\CS47AUXS
    SET COBOL_HOME=C:\CS47AUXS\OFFLINE
    CD %NETX_HOME%
    CALL SET-NETX.CMD
    CD %COBOL_HOME%
    SSBPPC10 JOBOMNI X
    SET JH=C:\J2SDK1.4.2_04\BIN
    SET OMNI_HOME=C:\CS47AUXS\OMNILOADJAR
    CD %OMNI_HOME%
    %JH%\java -jar omniload.jar
    Can anyone shed some light here? Even when I execute the application from the command line the new DOS box doesn't become visible nor can I see any errors. If I could just get that visibility, I could probably figure out what is going wrong.

    Same problem with me as well.... Badly looking for a solution...
    I predict the following:
    - If your batch file has pretty less number of dos/shell commands then it gets executed fine with exec() and proc.waitFor();
    - If you increase the number of dos/shell commands in the bat file then try executing it then it definately hangs at proc.waitFor();
    Even "cmd.exe /C C:\\test.bat" hangs... if the commands are more...
    Is this some sort of bug? or am i doing anything wrong? I tried searching for solution on the net and search forums... but couldnt find a solution for the same.. not sure where i missed, what i missed...
    Incase some one finds a solution.. do post it here...
    Message was edited by:
    amadas

  • There is ClassNotFoundException when executing createMessage funciton

    There is ClassNotFoundException when executing createMessage funciton,but I cannot trace which class cannot be found.
    import java.io.*;
    import javax.xml.soap.*;
    import javax.xml.transform.stream.StreamSource;
    private SOAPMessage produceMessage() {   
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage message = messageFactory.createMessage();
    SOAPPart soapPart = message.getSOAPPart();
    StreamSource src = new StreamSource(new FileInputStream("soapmessage.xml"));
    soapPart.setContent(src);
    message.saveChanges();
    return message;
    } catch (SOAPException e) {
    System.err.println(e.getMessage());
    } catch (IOException e){
    System.err.println(e.getMessage());
    }

    the error message should tell you the class it could not load. (maybe the name, maybe the whole package name). Theres a BOAT load of library files used for soap messaging (with JAXM at least) that ive found need to be included on your classpath.
    try saaj-api.jar and saaj-ri.jar.
    Chris

  • ClassNotFoundException executing midlet

    Hello,
    I use Forte For Java v.3 and J2ME (midp,cldc).
    I have those files in my package c:/ProjetJ2ME/src/HelloMIDlet :
    HelloMIDlet.java
    HelloMIDlet.class
    HelloMIDlet.jar
    HelloMIDlet.jad
    // I declare the package in my java file : package HelloMIDlet
    When I execute HelloMIDlet.jad (under Forte), the Gray phone appears and we can read the file name (HelloMIDlet) on the screen (Emulating).
    But when I launch the program, a ClassNotFoundException appears :
    Unable to create MIDlet HelloMIDlet.HelloMIDlet
    java.lang.ClassNotFoundException: HelloMIDlet.HelloMIDlet
    at com.sun.midp.midlet.Selector.commandAction(+47)
    at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+152)
    at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+427)
    I think it comes from my pathes :
    //autoexec.bat
    PATH=C:\jdk1.3.1_02\bin;C:\jdk1.3.1_02\lib;
    PATH=%PATH%;c:\j2me\midp1.0.3fcs\bin;c:\j2me\j2me_cldc\bin;
    SET CLASSPATH=.;C:\j2me\midp1.0.3fcs\classes;
    I tried to precise my jar file in the classpath :
    SET CLASSPATH=.;C:\j2me\midp1.0.3fcs\classes;
    SET CLASSPATH=%CLASSPATH%;C:\ProjetJ2ME\src\HelloMIDlet\HelloMIDlet.jar
    But I always have my error !
    Can it be a package problem, a classpath problem ... ?????
    Thank you
    (Excuse my english)

    I had this error also. I found that
    I the Midlet settings, under the
    property "Class" -- I had the ".class"
    extension when it did not want this.
    For example,
    For class: foo.class (WRONG)
    class: foo (RIGHT)
    Note: these parameters refer to using the
    J2ME Wireless toolkit.
    Hope that helps,
    - Mike

  • Problem in executing MIDlet on Actual Device

    Below is the program i got from net, this is executing fine in the emulator but when I ported the application to actual device i.e. Nokia 7610, data was not fetched from the given URL, neither i got any exception nor error.
    I have WAP connection enabled on my mobile and also I was able to browse the same URL from the default browser that was there in the mobile.
    J2ME: The Complete Reference
    James Keogh
    Publisher: McGraw-Hill
    ISBN 0072227109
    // jad file (Please verify the jar size first)
    MIDlet-Name: httpconnection
    MIDlet-Version: 1.0
    MIDlet-Vendor: MyCompany
    MIDlet-Jar-URL: httpconnection.jar
    MIDlet-1: httpconnection, , httpconnection
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-1.0
    MIDlet-JAR-SIZE: 100
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class httpconnection extends MIDlet implements CommandListener {
    private Command exit, start;
    private Display display;
    private Form form;
    public httpconnection ()
    display = Display.getDisplay(this);
    exit = new Command("Exit", Command.EXIT, 1);
    start = new Command("Start", Command.OK, 1);
    form = new Form("Http Con");
    form.addCommand(exit);
    form.addCommand(start);
    form.setCommandListener(this);
    public void startApp()
    display.setCurrent(form);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command command, Displayable displayable)
    if (command == exit)
    form=null;
    display.setCurrent(null);
    display=null;
    destroyApp(false);
    else if (command == start)
    HttpConnection connection = null;
    InputStream inputstream = null;
    try
    connection = (HttpConnection) Connector.open("http://www.someURL.com");
    //HTTP Request
    connection.setRequestMethod(HttpConnection.GET);
    connection.setRequestProperty("Content-Type","//text plain");
    connection.setRequestProperty("Connection", "close");
    // HTTP Response
    System.out.println("Status Line Code: " + connection.getResponseCode());
    System.out.println("Status Line Message: " + connection.getResponseMessage());
    if (connection.getResponseCode() == HttpConnection.HTTP_OK)
    System.out.println(
    connection.getHeaderField(0)+ " " + connection.getHeaderFieldKey(0));
    System.out.println(
    "Header Field Date: " + connection.getHeaderField("date"));
    String str;
    inputstream = connection.openInputStream();
    int length = (int) connection.getLength();
    if (length != -1)
    byte incomingData[] = new byte[length];
    inputstream.read(incomingData);
    str = new String(incomingData);
    else
    ByteArrayOutputStream bytestream =
    new ByteArrayOutputStream();
    int ch;
    while ((ch = inputstream.read()) != -1)
    bytestream.write(ch);
    str = new String(bytestream.toByteArray());
    bytestream.close();
    form.append(str);
    System.out.println(str);
    connection.close();
    catch(IOException error)
    System.out.println("Caught IOException: " + error.toString());
    finally
    if (inputstream!= null)
    try
    inputstream.close();
    catch( Exception error)
    /*log error*/ }
    if (connection != null)
    try
    connection.close();
    catch( Exception error)
    /*log error*/
    Please help me out what are the things I have to do to run this MIDlet on my Nokia 7610.
    Thanks in advance.

    You ever find an answer? I have an LG VX5200 phone which is supposed to support Java. But aside from downloading Java apps from other sites I'm trying to figure out which folder on the phone's filesystem you place the file. With BitPIM and QPST you can view the phone's filesystem. But as yet to find either a folder that works or combination of settings to get it to show up on the phone list of apps.
    I had hoped that maybe someone had downloaded a game from a site and then looked at the phone to see where and how it's stored. I can't from where I'm at.
    Michael

  • What's the problem(about MIDlet execution on windows  platform)?

    I port MIDP to win32, and it can install MIDlet and can use midp -list to check all midlets it installed.
    But when I run MIDlet, midp -run 1 -heapsize 1M, it prompts me "Bad dynamic heap objects found".
    Is anybody encounter this kind problem? could you give me sone suggestion?
    thanks.

    Hi Leslie,
             After you have installed your SAPGUI Client on ure host, try accessing this object and running this object from you SAPClient.Please send the snippet of your code and also let us know what exactly are you trying to execute.
    Regards,
    Uma.

  • Problem Executing OracleConnectivity.jar

    hi,
    I have a strange problem when i execute the code (java OracleConnectivity) it works fine, but when i make its jar file and execute it (java -jar OracleConnectivity.jar) it throws exception
    java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at OracleConnectivity.main(OracleConnectivity.java:8)
    here goes the code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OracleConnectivity
    public static void main(String[] args)
    try{
    Class.forName("oracle.jdbc.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@172.16.172.221:1521:dbsettle","settlement","settlement");
    Statement stm = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = stm.executeQuery("SELECT * FROM rm_number_location_t");
    while(rs.next())
    System.out.println(rs.getString("RM_LOCATION_NUMBER_PREFIX"));
    }catch(Exception e){e.printStackTrace();}
    my class path is
    F:\jdk1.4\jre\lib\rt.jar;F:\jdk1.4\lib\tools.jar;F:\jdk1.4\jre\lib\ext\comm.jar;C:\Documents and Settings\gohar\Desktop\stuff\wma-1_1-src-windows-i686RI\wma1.1fcs\lib;F:\jdk1.4\jre\lib\ext\classes12.zip;F:\jdk1.4\bin;
    the code works even if i dont import
    import oracle.jdbc.driver.*;
    any slutions , thanks in advance.

    for class file
    java OracleConnectivity
    for jar file
    java -jar OracleConnectivity.jar
    I have worked around the problem.I made a .bat file syntax
    java OracleConnectivity
    and it works fine
    But still i cant get that why jar file was throwing Exception

  • Executing MIDlet in POSE from Forte

    This has been working fine all along for me. Just right-click on my midlet's .adContent file in Forte's explorer window, select "execute," and voila: dirty source files are compiled, the jar file is built, the .prc file is created, the emulator comes up, the .prc is loaded into the emulator, and the MIDlet is launched in the emulator.
    But now, mysteriously, when I try to execute all I get is a message in the output window:
    Warning: no .prc to run
    And when I try to launch the converter tool from Forte, nothing happens. I don't know what I did to cause this problem.
    The MIDlet builds with no errors. Anybody know what's up?
    -k

    Hi,
    Sorry, though I cannot give you a useful hint I hope you have made out any solutions in the meantime?
    I seem to have a similar but a more basic problem, for the Palm OS Emulator from Wireless toolkit 1.0.3 does not launch at all inside Forte for Java 4 ME.
    While executing the e.g. example application named UIDemo, Forte Output window states:
    "Wrote: C:\Java\Ide\forte4j\emulator\j2mewtk-1_0_3-win\wtklib\devices\PalmOS_Device\UIDemo.prc
    java.io.IOException: CreateProcess: C:\Java\Palm\PalmOsEmulator\PalmOsEmulator -load_apps C:\Java\Ide\forte4j\emulator\j2mewtk-1_0_3-win\wtklib\devices\PalmOS_Device\MIDP_g.prc,C:\Java\Ide\forte4j\emulator\j2mewtk-1_0_3-win\wtklib\devices\PalmOS_Device\Params.pdb,C:\Java\Ide\forte4j\emulator\j2mewtk-1_0_3-win\wtklib\devices\PalmOS_Device\UIDemo.prc -run_app UIDemo error=2"
    I have also installed POSE.
    Any ideas?
    Thanks
    -tk-

  • Problem executing programs after instaling Studio 8.1

    I had JDK 1.5 installed on my computer. I earlier used to code my programs either in a text-editor or JCreator & run them from the command prompt.
    I recently installed Studio Enterprise 8.1. My programs execute successfully from the IDE. They also complie successfully from the command prompt. But whenever I try to run them now from command prompt or JCreator, I always get a
    Exception in thread "main" java.lang.NoClassDefFoundError: <class name>
    exception. Even when I am not using packages & the programs being run reside in the current directory only, where java.exe resides.
    Can somebody help me????

    The last few lines of the output are as follows:
    [Loaded java.util.zip.ZipFile$2 from shared objects file]
    [Loaded java.util.zip.Inflater from shared objects file]
    [Loaded java.lang.Math from shared objects file]
    [Loaded java.security.PrivilegedActionException from shared objects file]
    Exception in thread "main" java.lang.NoClassDefFoundError: sample
    [Loaded java.lang.Shutdown from shared objects file]
    [Loaded java.lang.Shutdown$Lock from shared objects file]
    There was a whole series of Loaded module above these, from which I could not figure out any problem.

  • Unique Problem executing a Non Interactive Adobe Invoice form

    I am approaching the forums after going through a tremendous check on both the ABAP Program and the Adobe form .
    We were almost on completion of invoice , everything was working from the header and the main body and we tested it.
    We have been developing the invoice for 35 bus days and we finally reached to Terms page when the adobe form does not show in print preview.
    We removed all the elements in the form which we changed lately and brought it back to the same stage where it was running smoothly, still the same issue , when we run the abap program it says form is executed but does not result in a pdf , our small test programs and default pdf test programs are all showing up in preview.
    ADS is working ,test programs are working fine its the custom program that is not generating a pdf .
    Did u have seen situations like these , any good suggestions to resolve this problem.

    If the test programs are working fine then I think the problem will be with the custom program.
    Please check the program and let me know.
    Thanks,
    Chandra Indukuri

  • Problem executing form 10G

    Hi Buddies;
    I'm trying to execute FORM 10G, but when I choose Run Form, I get this error message;
    Internet Explorer has closed this webpage to help protect your computer
    A malfunctioning or malicious add-on has caused Internet Explorer to close this webpage.
    Previously I could execute the form, but after some problems in my laptop and had to reinstall the OS.
    Now I got this problem.
    Have any idea how to solve this?
    Also, I was trying using Firefox, but getting similar error message.
    Suggestions are welcome.
    Regards
    Al

    Hi,
    You have to replace the JVM.DLL in the directory *<Program Files>\Oracle\JInitiator 1.3.1.22\bin\hotspot* with the latest jvm.dll(2.2Mb) from here.
    And if you are using Explorer 8, then do the following.
    1. Open Internet Explorer 8
    2. Go to Tools, Internet Options
    3. Click on the Advanced tab.
    4. Scroll down into the Security section and find “Enable memory protection to help mitigate online attacks”.
    5. Uncheck “Enable memory protection to help mitigate online attacks”.
    6. Click Ok and Ok again.
    7. Reboot your computer.Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

Maybe you are looking for

  • Purchase Order Partner Functions

    Hi all, I am adopting PO from another purchase order. The vendors are diifferent in my old PO and new PO. When I create the new PO, the partner functions of old PO are adopted. Even after i enter the new vendor, it doesnot update to new partner funct

  • Premiere pro project suddenly degraded

    My 50-minute Premiere Pro project suddenly degraded between work sessions. It contains mixed footage - mov files the smallest and the sequence settings match that - and dv footage. It looked perfect, but when it was opened to resume work on another d

  • Strange load performance...

    Hi, folks! My SWF-files don´t seem to load the way i want after publication. I usually build in a kind of loading bar to show loading process while loading, it should be visible right away, till the main movie starts playing. But the browser seems to

  • Default URLs for discoverer 4i

    Hi All, Could anybody please tell me the default URLs for discoverer 4i adminitrator/viewer/plus and how to create a discoverer 4i user account so that user can log in and use the discoverer viewer/plus? Thanks a lot!

  • BAPI_GOODSMVT_CREATE - Movement type 309

    I am using  this BAPI to do a 309 movement.  I get the error message M7 E021                                                                  Deficit of SL Unrestricted-use . I do not get the error message for the same data when i use MB1b.  The prob