Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

J2ME CODE ERROR

Posted on 2007-10-13
5
Medium Priority
?
257 Views
Last Modified: 2013-12-29
I'm doing a project in J2ME , i get the following error message when i compile my class file this is a huge project please give me the solution .
related website any.
Below is my code:-
TextEvent tevent = (TextEvent)event;
and
while (!(event instanceof EndDocument));        

when i build, the error msg is :-
438: cannot resolve symbol symbol  : class TextEvent  
location: class org.GetData
 TextEvent tevent = (TextEvent)event;
     ^
462: cannot resolve symbol symbol  : class EndDocument
 
location: class org.GetData
 while (!(event instanceof EndDocument));
                                     ^  

can u pls tell me what's wrong for this two coding?

 thanks
0
Comment
Question by:dev_kittu
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 20072921
sounds like you don't have the required imports

eg.

import java.awt.event.TextEvent;
0
 

Author Comment

by:dev_kittu
ID: 20072963
i get the same error , after importing textevent class .  My wireless tool kit unable to find the class even though it was imported.

hi expert , does KXML package holds textevent class?
0
 
LVL 12

Accepted Solution

by:
keyurkarnik earned 2000 total points
ID: 20164181
First of all - I would advise you to use eclipse along with the EclipseME plugin for developing your J2ME code.

http://www.eclipseme.org/


All you need to do is create your project, and add the required libraries into the build path. The reason for your failure could be because you have not included the libraries including the said classes to your classpath.

The reasonf or that is because AWT is a prt of JAVA NOT J2ME. You cannot use AWT for J2Me. Instead you need to use the lcdui package classes.


Read this here for the solution :

http://www.onjava.com/pub/a/onjava/excerpt/wirelessjava_ch5/index1.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
Simple Linear Regression
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question