How to set Server IP Address in j2me(MIDP 2.0) Jar file Dynamically?

You can add server address in JAD file as custom properties like.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

I am working on a j2me platform... Now, I put the Server machine IP Address in j2me coding Statically. Now, its Working fine. But incase, the Server IP Address is changed, then I want to change my code in the jar file placed in the mobile.

So,it is not good way to do each time the server ip changed. Please give me a better way for dynamically assigning the server ip address in my j2me code whenever server ip address changed? Java-me link|improve this question edited Dec 15 '10 at 11:38JoseK11.9k41030 asked Dec 15 '10 at 10:55Saravanan1,241624 98% accept rate.

Thanks Jose.... – Saravanan Dec 15 '10 at 11:47.

You can add server address in JAD file as custom properties like. ServerAddress: example.com and you can read this url in your code. String url= MIDlet.

GetAppProperty("ServerAddress"); So if you are changing server address, you need to change url address in jad file only not in jar file. E.g. If you check JAD file of gmap you can see lots of custom JAD properties including this ServerAddress: http://mobilemaps.clients.google.com/glm/mmap.

Please guide me... is this necessary to add jad and manifest in mobile?.... Please reply me I am expecting your reply – Saravanan Dec 15 '10 at 14:05.

Use a domain name so that changes to the ip address will be updated. If this isn't possible or if the ip address is changing frequently you could look into Dynamic DNS providers.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions