Discussion Locked

Controls to address memory with JAVA????

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi!....I nedd know if I can memory address manipulating, sending bytes to this address, Java can with this?......Java permits write to specific address?....this is for controls card....

I hope your help.....Very Thanks....

Atte. PMCVM

3 replies

by gaston nusimovich

Perla:

One of Java's main design features is that Java is Internet-safe and secure.
That means that Java keeps resources (like memory addresses) away from hackers.
That is by design. That means that you can't do what you want with Java alone.

But Java has a way to interface with functions stored on DLLs coded in such languages as
C or C++. To do that, you must use native methods (NM).
This forces you to design a Java application for your problem (forget the Web).
It also means good-bye to platform independence (DLLs are platform-dependent), so you
may solve your problem with NM only if you design you application for the platforms that
support Java NM (as far as I know, only Windows does that so far, but you should check this).

You may design most of your application in Java, and code the memory manipulation routines in C.

With the 1930 character limit I can't explain you how to design a Java application with
NM, and how to design the DLL and its functions to properly interface with Java.

But you may be able to get a grasp of things by checking out this URL:

http://java.sun.com

Search for the phrase native methods, and you will get a bunch of examples on how
to design Java apps with NM.

If I were you, I would not use Java to design a solution for this problem,
and I would firmly recommend you to change the entire approach: too many problems and restrictions right from the start.

But if your application can live with all these restrictions, go ahead with Java and NM.
If not, forget about Java and use C or C++.

This discussion is closed to new replies.