[PLUG-Devel] RAD for hardware control? Java? Something?

Alan Dayley alandd at consultpros.com
Thu Dec 14 08:28:30 MST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jon M. Hanson wrote:
>     The problem is that Java isn't a "bare metal" language. Java runs in 
> a sandboxed virtual machine which translates the Java bytecode into the 
> native machine language on the fly. Because of Java's ability to do 
> cross-platform without any code modification, it would not be possible 
> for it to peek and poke at hardware registers like you want it to 
> because that would violate the cross-platform ability (not all platforms 
> have those specific registers at the same location) and it is a security 
> risk as well.

This is exactly what I suspected.  Thanks for that education.

As a follow-up: Given that the JVM isolates the program from the
hardware, is it possible to write an "extension" to the JVM that allows
such access for a specific hardware platform?

Already knowing that the answer to this question is in the affirmative,
the follow-up to that is:  How hard is it?  Is the JNI hard to use?
And, what development environments are available to write to it?

The goal would then be to do some more difficult but short duration of
development to provide the needed hardware access via JNI.  Then, the
actual application logic and UI could be developed in Java with the
previously mentioned benefits.

But if writing the hardware interface in C or C++ is hard enough, might
as well just write the entire application in C.

I'll have to think about this more...  Continued discussion very welcome.

Alan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFgW2eDQw/VSQuFZYRAnnmAJ9JqEzLcrrarPKtyMOg8EV/HS565gCfSkwU
q9ba/Wr4stQIz0VAKaEkNQ8=
=cvd1
-----END PGP SIGNATURE-----


More information about the PLUG-devel mailing list