CDCInitpublic class CDCInit extends Object Initialize the CDC environment for MIDlet execution. |
Methods Summary |
---|
public static void | init(java.lang.String midpHome, java.lang.String nativeLib)Performs CDC API initialization.
try {
if (nativeLib != null) {
System.loadLibrary(nativeLib);
}
} catch (UnsatisfiedLinkError err) {
/*
* Since there is currenly no to determine if the build rommized
* the MIDP native methods or not, it is customary to pass in a
* default library name even if there is no library to load,
* which will cause this exception, so the exception has to be
* ignored here. If this is a non-rommized build and library is
* not found, the first native method call below will throw an
* error.
*/
}
/*
* In case the normal system properites configration did not set
* the profile set it here.
*/
String profile = System.getProperty("microedition.profiles");
if (profile == null) {
System.setProperty("microedition.profiles", "MIDP-2.1");
}
initMidpNativeStates(midpHome);
| public static void | init()Performs CDC API initialization.
/*
* Path to MIDP working directory.
* Default is the property "sun.midp.home.path",
* the fallback is user.dir.
*/
String userdir = System.getProperty("user.dir", ".");
userdir+= File.separator + "midp" + File.separator + "midp_fb";
String home = System.getProperty("sun.midp.home.path", userdir);
String lib = System.getProperty("sun.midp.library.name", "midp");
init(home, lib);
| static native void | initMidpNativeStates(java.lang.String home)Performs native subsystem initialization.
|
|