1

Possible Duplicate:
Is it possible to code a device driver in Java?

Kernel or device driver programming is possible in Java?

Community
  • 1
  • 1
SamSol
  • 2,885
  • 6
  • 37
  • 56

3 Answers3

5

There are a few Java OSs such as JNode, JX and JavaOS, so it is possible, but always requires a core microkernel (and, of course a JVM) written in a low-level language that offers the Java code the necessary API to access the hardware directly.

Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720
2

Well technically, java is merely a language definition, which can be compiled into any other (turing complete) language :)

Set aside the issues on kernel-communication, you could for instance use GCJ: The GNU Compiler for the JavaTM Programming Language

GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.

Whether or not Java is a suitable language for device driver programming is another question :-)

aioobe
  • 413,195
  • 112
  • 811
  • 826
0

Unless you have a kernel running on top of a JVM - no. You can use the Java language however and use a compiler like GCJ to native code, but it's mostly pointless, since you won't have access to most libraries you need anyways.

Bozhidar Batsov
  • 55,802
  • 13
  • 100
  • 117