try{
FileConnection fc = (FileConnection) Connector.open("file:///home/u.txt",Connector.READ_WRITE);
if(!fc.exists()){
fc.create();
}
OutputStream os = fc.openOutputStream();
os.write("test".getBytes());
}catch(IOException ex){
ex.printStackTrace();
}
+ من همون کدی که اینجا گذاشتید هم امتحان کردم نتیجه همین شد.