Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Java Technology : Education - online courses
J2ME: Step by step
Download tutorial zip fileView letter-sized PDF fileView A4-sized PDF fileE-mail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPreviousNext
3. Developing J2ME applications
  


Compiling considerations page 5 of 6


As with any other Java application, you compile the application before packaging and deploying it. With J2ME, however, you use the J2SE compiler and need to invoke it with the appropriate options.

In particular, you need to use the -bootclasspath option to instruct the compiler to use the J2ME classes, not the J2SE classes. Do not place the configuration classes in the compiler's CLASSPATH. This approach will lead to run-time errors, because the compiler automatically searches the J2SE core classes first, regardless of what is in the CLASSPATH. In other words, the compiler will not catch any references to classes or methods that are missing from a particular J2ME configuration, resulting in run-time errors when you try to run your application.


Main menuSection menuGive feedback on this tutorialPreviousNext
PrivacyLegalContact