hi guys, im trying to program a java application that can access(read and write) memory of another application. for example, an auto-move application for an online game. How is it done or what is it called or how am i gonna start?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
hi guys, im trying to program a java application that can access(read and write) memory of another application. for example, an auto-move application for an online game. How is it done or what is it called or how am i gonna start?
Are you asking about changing the memory of an executing program from another program written in java? I don't think it can be done by java alone.
I'd think the OS would prevent it.
If you don't understand my answer, don't ignore it, ask a question.
so you would suggest me to write it in C++?
the program i wanted to access is (.exe), might help
Sorry, this is a java forum, not C++
If you don't understand my answer, don't ignore it, ask a question.
I answered that question. See post#2
If you don't understand my answer, don't ignore it, ask a question.
sorry but i wasnt satisfied by your answer what else i need to have?
As Norm said, you can't do this with Java as the language isn't intended for this kind of low level memory management. More accurately, you can but shouldn't.
There are two workarounds. You can take a look at sun.misc.Unsafe. It's dangerous, undocumented and specific to sun JVM's but it's possibly to abuse it to gain direct access to memory. You will have to explore the JVM source for how this could be achieved. A better option would be to write the memory accessing function in C++ or C and write wrappers with JNI. Bare in mind that this kind of task is exceptionally complex and the operating system will fight against you.
Sounds like a Robot is what you want.an auto-move application for an online game