File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes MIDlets and classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "MIDlets and classes" Watch "MIDlets and classes" New topic

MIDlets and classes

Max Simpson
Ranch Hand

Joined: Sep 23, 2004
Posts: 30
Is a MIDlet a single class file or multiple class files? I am a bit confused because when using an IDE to create a MIDlet, everytime I create a new class it is just added to the bottom of my existing class.
I tried working with a MIDlet suite, but the seperate class files do not "see" each other and the program will not work.
Punit Raizada
Ranch Hand

Joined: Mar 20, 2004
Posts: 156

Which IDE are u using ???

SCJP 1.4
Everything that can go wrong will go wrong -Murphy
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
A MIDlet is one class. A MIDlet application (packaged in a JAR file) can contain the MIDlet class and any number of other supporting classes.

A Java file can define one public class and any number of non-public classes. A MIDlet application can have any number of Java files.

Seam Framework:
Max Simpson
Ranch Hand

Joined: Sep 23, 2004
Posts: 30
Thanks. I was confused and thought a Midlet was like a package and contained multiple class files. I guess a Midlet Suite is what I should be using for multiple class files.
I agree. Here's the link:
subject: MIDlets and classes
jQuery in Action, 3rd edition