J2ME怎么写入txt
WTK2.5模拟器应该是自带JRS75协议的吧,是吗?
我用的下面的代码写入不行啊
try{ FileConnection fc = (FileConnection)Connector.open("file://localhost/d:/b.txt",Connector.READ_WRITE); byte[] b="Hello World".getBytes(); OutputStream os = fc.openOutputStream(); os.write(b,0,b.length); System.out.println("写入成功"); }catch (Exception e) { // TODO: handle exception }