• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ....
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic