This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Memory related stuff ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Memory related stuff ..." Watch "Memory related stuff ..." New topic
Author

Memory related stuff ...

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi ranchers,

Is there a way to write a MIDlet that checks the amount of memory available ?
And, is there a way to check the amount of battery available ?

If anybody can guide me into a helpful tutorial, i will be more than thankful.

Regards ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
Methods freeMemory() totalMemory() in java.lang.Runtime are implemented (or should be) by CLDC devices (see http://java.sun.com/javame/reference/apis/jsr139/java/lang/Runtime.html)



In regard to battery power, I am not aware of a standard way to obtain it through the J2ME standard APIs (maybe a manufacturer specific API).

[ March 19, 2007: Message edited by: Eduardo Marques ]

[ March 19, 2007: Message edited by: Eduardo Marques ]
[ March 19, 2007: Message edited by: Eduardo Marques ]

Eduardo Marques
Get ready for your SCMAD certification at J2MECertificate.com - See what all the buzz is about ...
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi Eduardo,

It worked
I actually have used this API in my J2SE applications, but yesterday, when i was trying to program my MIDlet i was using the Properties class instead (which does not work for MIDlets), i always have a conflict in using these two classes

Thanks alot for guiding me

Best of luck ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Memory related stuff ...
 
Similar Threads
JBoss Memory Management
Memory management.
BlueJ Error Message Please Help
Can i limit memory consumed by an Objects (Aplication)
Increasing Memory available with Eclipse