how can I get the path in which my application can read and write? I have my app so far that in the SUN emulator everything works fine. But as soon as I launch it with the emulator nothing works.
Is there a solution to this which would work on every device so to say not device specific or even nokia specific?
String filePath = GlobalFunctions.defaultFilePath;
filePath = System.getProperty("java.class.path");
if (GlobalFunctions.RunningTestEnviorement) {
return filePath;
}
FileConnection fc = null;
try {
fc = (FileConnection) Connector.open("file://localhost/" + filePath);
if (!fc.exists()) {
fc.mkdir();
}
if (fc != null) {
fc.close();
}
} catch (IOException ioe) {
return null;
}

Reply With Quote


