FileDocCategorySizeDatePackage
MIDletAppImageGenerator.javaAPI DocphoneME MR2 API (J2ME)2499Wed May 02 18:00:06 BST 2007com.sun.midp.main

MIDletAppImageGenerator

public class MIDletAppImageGenerator extends Object
This class is designed to provide the functionality needed for generating the binary image from the MIDlet suite classes.

Fields Summary
Constructors Summary
Methods Summary
public static booleancreateAppImage(int suiteId, com.sun.midp.midletsuite.MIDletSuiteStorage suiteStorage)
Creates new binary application image. If application image already exists then it will be removed and replaced by new one.

param
suiteId - suite ID
param
suiteStorage - suite storage
return
true if application image was generated successfully, false otherwise

        if (!Constants.MONET_ENABLED) {
            throw new RuntimeException("Monet is disabled");
        }

        String binFile = suiteStorage.getMidletSuiteAppImagePath(suiteId);
        String suiteJar = suiteStorage.getMidletSuiteJarPath(suiteId);
        removeAppImage(binFile);
        return MIDletAppImageGeneratorBase.generateAppImage(
            suiteJar, binFile, 0);
    
private static native booleanremoveAppImage(java.lang.String binFile)
Removes the given application image.

param
binFile path to the application image
return
true if application image was successfully removed, false otherwise