• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help please Exception in thread "main" java.lang..........

 
nicholas gates
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody
i'm new to j2me and just tried to run a new midlet using wtk
example midlets are running fine
but when i try to run my midlet i get
the following exception
Exception in thread "main" java.lang.No Class Def FoundError: myfirstmidlet
can somebody please help me out

nicolas
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
myfirstmidlet

Well, we need a little bit more information. Code would be helpful and where the file is located.

First I'd say that the name of your class does not follow Sun's naming standards for classes in genereal. And that is Starts with a capital letter and each word is proper case.

So you class should be

MyFirstMidlet

and the file that stores that class should be

MyFirstMidlet.java

Question? Can you compile the class through WTK?

Also, if you are running this in WTK, make sure that the java file is in the c:\%WTK_HOME%\apps\YourProjectName\src directory.

Those two alone might be the reasons, by a wild guess on my part.

Good Luck

Mark
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You might also want to check the Jad file ... the attribute Midlet-1 to be more specific.. check if the class is specified correctly along with the package name ....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic