NEED HELP : System.getProperty() does not work with PALM EMULATOR
Hi,
my MIDlet which call System.getProperty() to get information contained in the system.config file of the J2ME WTK 1.0.3 does not work when i launch it with the Palm Emulator.
Is it possible to get information from a file which is not in the prc file ?
anyone can help me?
thanks a lot
[332 byte] By [
greneche] at [2007-9-26 13:00:00]

What does "does not work" mean? Is there an error message? or does it return a empty string or a null?
System.getProperty() is used only for a limited list of specific properties implemented by the implementor of the profile (device manufacturer). If you want to get info from the JAD file, you can use MIDlet.getAppProperty()
Also, what file are you trying to read from the Palm emulator? If you are trying to read a file which resides on the PC, that is impossible unless you want to write some network code to read files via HTTP. On the emulator, like on real Palm pilots, you can only read/write RMS record stores.
Don
[greneche],
If you wish to use the System.getProperty() to obtain the standard system properties, there is only a limited set of properties that you can obtain that are independent of the device:
System.getProperty("microedition.platform")
System.getProperty("microedition.encoding")
System.getProperty("microedition.configuration")
System.getProperty("microedition.profiles")
You can't use the System.getProperty() method to read in a file that is located in some directory of the system that you are running the Palm OS emulator.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/
If you want READ ONLY access to a file, you can pack the file into your jar (by including it in the directory), then read it into a DataInputStream object by calling:
getClass().getResourceAsStream( fileName );
I have found this very handy for storing custom application data in files.