473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Uncaught Exception

24
Dear All,

I hope that i put this question in correct section.
Today I plan to start my first lesson in j2me, and I download a simple book and I try my first program.
When I take a second step to add commands, I face an error message which is:
Expand|Select|Wrap|Line Numbers
  1. uncaught exception java/lang/noclassdeffounderror: readfile.
So, would you please help me to understand this message? and how to solve it?
Please find my code below.
Expand|Select|Wrap|Line Numbers
  1. import javax.microedition.midlet.*;
  2. import javax.microedition.lcdui.*;
  3. public class ReadFile extends MIDlet implements CommandListener
  4. {
  5.     private Form form1;
  6.     private Command Ok, Quit;
  7.     private Display display;
  8.     private TextField text1;
  9.     public void startApp()
  10.     {
  11.         form1 = new Form( "TA_Pog" );
  12.         Ok = new Command("Ok", Command.OK, 1);
  13.         Quit = new Command("Quit", Command.EXIT, 2);
  14.         form1.setCommandListener(this);
  15.         form1.addCommand(Ok);
  16.         form1.addCommand(Quit);
  17.         text1 = new TextField("Put Your Name :","His Name : " , 32, TextField.URL );
  18.         form1.append(text1);
  19.         display = Display.getDisplay(this);
  20.         display.setCurrent(form1);
  21.     }
  22.     public void commandAction(Command c , Displayable d)
  23.     {
  24.         if (c == Ok)
  25.         {
  26.             Alert a = new Alert("Alert","This Alert from Ok Button", null, AlertType.ALARM);
  27.             a.setTimeout (3000);
  28.             display.setCurrent(a,this.form1);
  29.         }
  30.         else
  31.         {
  32.             this.notifyDestroyed();
  33.         }
  34.     }
  35.     public void pauseApp() {}
  36.     public void destroyApp( boolean bool ) {}
  37. }
  38.  
Note: the code above is taken exactly from a book.

Thanks in advance
Besr regards
Dec 29 '11 #1
0 1305

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: nrhayyal | last post by:
hi all, i am facing a problem in catching an exception which is uncaught in any of the catch block. not doing so will gives me coredump. I tried by rewriting set_unexpected() and set_terminate()...
7
by: meaneyedcat | last post by:
When I call addField(), my table appears to be populated correctly with a new row in the table with all the required fields. However, when I call delete row on any new rows that have been created,...
3
by: c.prerovsky | last post by:
Hi there, I started messing around with JavaScript OOP a few days ago and still can't get this one to work. There are many things wich keep confusing me, eg. the various ways to define a class...
5
by: -Lost | last post by:
Error: uncaught exception: " nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL:: line 15" data: no] Line 15...
2
Plater
by: Plater | last post by:
I am using the XMLHttpRequest to send a request every 5ish seconds or so. Everything works fine until I take the server down that the object is trying to retrieve data from. Then the firefox...
9
by: xhunter | last post by:
Hi, I have written my code to load some content through ajax, which works perfectly, then I thought of adding a timeout to retry the action in case it has failed or something. here is the code...
3
by: George2 | last post by:
Hello everyone, Just want to check whether my understanding is correct, Both (1) and (2) only covers Windows C++ platform. 1. If there is uncaught exception, destructor is not ensured to...
2
by: josephx | last post by:
Hello, I got some of these errors listed below after executing an HTTP Post MIDlet on CLDC/MIDP platform, "Nokia S40 DP 2.0 SDK 1.1" and "S40 5th Edition SDK Feature Pack 1" and even for S60's...
3
by: friend | last post by:
Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://manimekalai/VulnMgmt/scanfi/crs_source/vulnupdate/latest.php?vulnerability=2451 ::...
15
by: danielo | last post by:
class Error { Error(string err) { cout << err; } } void main() { try { throw string("exception"); } catch(Error Err) {
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.