I know the philosophical, technical and emotional discussions about pro and contra using pointers. I know the problems and the risks about it, but also the possibilities and necessities. All in all, I think, pointers are one way to realize solutions. If it is alright under technical aspects and cost criteria, we need no further discussion.

Pointer for Java™ (P4J)

Pointer with Java™, that is impossible. But now it is possible. A small pure Java™ Windows© library and a Java™ class, that is all you need.

With this library you can create variables outside of Java™ and get their addresses in memory back, for further using. You can set and get the variables and use a few functions to get informations about it. The library makes byte, short (integer), integer (long), long (currency), float (single), double and string types available, as soon as arrays, for user defined types.

Originally the library was designed for the use with Jabaco. So you find the definitions, especially the method names, near by Visual Basic.

And you can do something more: With this library and class it is possible to create an array of bytes, fill the array with opcodes and execute it with the Windows© API command CallWindowProc. This way opens the gate of a lot of CPU instructions, which can not be used otherwise with Java™.

Download of P4J (version 0.40 from 22.10.2010)
P4J.zip: 75'409 Bytes with MD5 CRC check sum: b5fbbece7a4a52af77703d892be4d466
P4J.dll: 33'280 Bytes with MD5 CRC check sum: 45071fdfc8fc7befd993f1abf0e8c2ca

The zip file contains:
P4J.dll  — 32-bit native Windows© library
P4J.dll in P4J_x64.zip  — 64-bit native Windows© library
libP4J.so  — 32-bit native Linux library
P4J.class.chm  — Javadoc™ help file for P4J.class
P4J.java  — Source code of the class
P4J.jar  — Java™ archive with the P4J.class
P4JTest.java  — Java™ test program