HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML
 

"The New PDA Profile"
Vol. 8, Issue 1, p. 54

	



Listing 1: A simple MIDlet

public class MyApp extends MIDlet {
   public void startApp()
   {
   }
   public void pauseApp()
   {
   }
   public void destroyApp()
   {
   }
}



Listing 2: A simple PDAlet

public class MyApp extends MIDlet {
   public void startApp()
   {
     java.awt.Toolkit tk = java.awt.Toolkit.getDefaultToolkit();
   }
   public void pauseApp()
   {
   }
   public void destroyApp()
   {
   }
}




Listing 3: A manifest file

MIDlet-Name: CardGames
MIDlet-Version: 1.0.0   
MIDlet-Vendor: PalmSource, Inc.
MicroEdition-Profile: PDAP-1.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: Solitaire, /solitaire.png, com.acme.cards.Solitaire
MIDlet-2: Poker, /poker.png, com.acme.cards.Poker
MIDlet-3: BlackJack, /bj.png, com.acme.cards.BlackJack
PDAlet-4: ScoreManager, /manager.png, com.acme.cards.Manager
PDAlet-5: CardPlayers, /players.png, com.acme.cards.Players




Listing 4: Showing preference for a PDAlet over a MIDlet in the manifest file

MIDlet-Name: CardGames
MIDlet-Version: 1.0.0   
MIDlet-Vendor: PalmSource, Inc.
MicroEdition-Profile: PDAP-1.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: Solitaire, /solitaire.png, com.acme.cards.Solitaire
MIDlet-2: Poker, /poker.png, com.acme.cards.Poker
MIDlet-3: BlackJack, /bj.png, com.acme.cards.BlackJack
PDAlet-2: PDAPoker, /PDApoker.png, com.acme.cards.PDAPoker
PDAlet-4: ScoreManager, /manager.png, com.acme.cards.Manager
PDAlet-5: CardPlayers, /players.png, com.acme.cards.Players




Listing 5: A JAD file

MIDlet-Name: Best MIDlet
MIDlet-Version: 2.0
MIDlet-Vendor: MyCompany
MIDlet-Jar-URL: http://www.mycompany.com/bestmidlet.jar
MIDlet-3: BlackJack, /bj.png, com.acme.cards.BlackJack
PDAlet-2: ScoreManager, /manager.png, com.acme.cards.Manager

 
 

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.