views:

46

answers:

2

getAppProperty(String key) is instance method in MIDlet class. Since all midlet in midlet suite share same manifest/jad file, so why cant it be a static method?

A: 

This is the most pressing issue you are asking about J2me? J2me is old dirty and most of API's interfaces suck.

On a scale of things that are wrong with J2me static vs instance of getAppProperty are sooo low I don't even think this question deserves an answer.

Further more I don't even think this question is answerable full stop.

drubin
one possible answer is: if its static method then external library developer can access midlet property, but its instance method so midlet developer has to pass midlet instance to other classes then only other classes can get midlet properties.
anupsth
I like your reasoning.
drubin
+1  A: 

If the phone runs several MIDlet suites inside the same JVM process, they all share the same MIDlet Class object.

If you then make the method static, it won't know which JAD file to retrieve information from.

Neither the CLDC nor the MIDP specifications prevent phone manufacturers from running several MIDlet suites inside the same JVM process. It is in fact more efficient to do so in a resource-constrained environment.

QuickRecipesOnSymbianOS