import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Form; import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDletStateChangeException; public class Test_getProperty extends MIDlet { public Test_getProperty() { } protected void destroyApp(boolean arg0) throws MIDletStateChangeException { // TODO Auto-generated method stub } protected void pauseApp() { // TODO Auto-generated method stub } protected void startApp() throws MIDletStateChangeException { Form f = new Form("获取属性"); // 平台名称 String str = System.getProperty("microedition.platform"); System.out.println(str); f.append(str + "\n"); // 所有支持的profile的名称 str = System.getProperty("microedition.profiles"); System.out.println(str); f.append(str + "\n"); // 平台当前locale str = System.getProperty("microedition.locale"); System.out.println(str); f.append(str + "\n"); // 平台支持的configuration的名称和版本号 str = System.getProperty("microedition.configuration"); System.out.println(str); f.append(str + "\n"); // 平台使用的默认字符编码方式 str = System.getProperty("microedition.encoding"); System.out.println(str); f.append(str + "\n"); Display.getDisplay(this).setCurrent(f); } }