Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

simple program error when it runs

Thread view: 
jack - 02 Dec 2005 18:26 GMT
hi all
     have jus tbrought developement kit for java mobile developement.
for sony erricson(p900 model mobile)
Im trying to create my first simple application with the help of the
example in the documentation  installed with toolkit.
      the code compiles properly but when try to run on the emulator
it gives the below error

'===========================================
Unable to create MIDlet TinyMIDIet
java.lang.ClassNotFoundException: TinyMIDIet
    at com.sun.midp.midlet.MIDletState.createMIDlet(+14)
    at com.sun.midp.midlet.Selector.run(+22)
'===========================================
below is my code which is just simple one
'===========================================

import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

public class TinyMIDlet
extends MIDlet

implements CommandListener
{
    public void startApp()
    {
        Display display = Display.getDisplay(this);
        Form mainForm = new Form("TinyMIDlet");
        mainForm.append("Welcome to the world of MIDlets!");
        Command exitCommand = new Command("Exit", Command.EXIT, 0);
        mainForm.addCommand(exitCommand);
        mainForm.setCommandListener(this);
        display.setCurrent(mainForm);
    }
        public void pauseApp () {}
        public void destroyApp(boolean unconditional) {}
        public void commandAction(Command c, Displayable s) {
        if (c.getCommandType() == Command.EXIT)
        notifyDestroyed();
    }
}

'===========================================
please do help me in this i have tryed a lot to find out whats wrong in
this code but unable to solve it please do reply as the is my first
application

Awaitng for reply
Thanks for the reply
tiewknvc9 - 02 Dec 2005 22:24 GMT
You may need to install the java virtual machine onto the device.
Sun.com should have one listed close to the MIDP library.
jack - 03 Dec 2005 05:21 GMT
Thanks for reply
i have already installed this . any way if i want to check this
whethere this is already installed in this pc how should i check it
im not a java programmer working in vb6 language .. but know just
little bit of java .. have learned long time back

Thanks once again

Needed help
Chris Smith - 03 Dec 2005 05:30 GMT
>        the code compiles properly but when try to run on the emulator
> it gives the below error
[quoted text clipped - 4 lines]
>     at com.sun.midp.midlet.MIDletState.createMIDlet(+14)
>     at com.sun.midp.midlet.Selector.run(+22)

The emulator needs to be run differently.  How are you launching it now:
from within a tool, or from the command line?  What else can you tell
us, particularly about the classpath if you've come across that term?

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

jack - 03 Dec 2005 16:30 GMT
i have ide  for developement


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.