Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-07-2008, 10:06 AM
Member
 
Join Date: Jul 2008
Posts: 1
newms86 is on a distinguished road
Read Process Memory
Is there a way to read the memory of a process running on the system in java? In c++ there is a readProcessMemory() from the Windows API already built in.

I am new to this. Is there a way to implement the Windows API in java or does java have something similar built in? Anything along the lines of the Robot class or something?

any advice is welcome. thanks!

I am using eclipse 3.3.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-07-2008, 05:25 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: SW MO, USA
Posts: 933
Norm is on a distinguished road
I don't think java by itself can look in memory. Maybe with JNI
Why would you need to do that?
Java is supposed to be independent of OS, so would not have the Windows(as in MS) API. It has its own GUI API.
Java has a Robot class.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-07-2008, 06:14 PM
Member
 
Join Date: Jun 2008
Posts: 13
jmHoekst is on a distinguished road
I had this issue just a couple weeks ago, and I ended up writing a small VB script that returns the memory of a process i specify to it. I have never written in VBscript before, so the code i got was hacked pieces of what I found on the internet. I actually ended up just writing the mem value to a .txt file and had my java program just read that .txt file. This might be a way for you to look into.

I'm not a Robot expert, but I don't think the Robot is going to help you very much here. It does have a waitForIdle method, but I'm not sure if that will help you. The robot is more applicable to simulating keyboard strokes, mouse movements, and delays.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inter process communication ibtehal Networking 5 06-23-2008 02:35 AM
i need help in http process sureshjava New To Java 0 01-29-2008 05:56 AM
How can I set a time out on the loading process paul Advanced Java 1 08-07-2007 05:54 AM
There's not enough memory to process the command. at java.io.FileInputStream mary New To Java 1 08-03-2007 07:17 PM
how to read memory addresses fred New To Java 1 07-24-2007 02:59 AM


All times are GMT +3. The time now is 04:10 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org