Topic: java 可不可以写设备驱动的?

  Print this page

1.java 可不可以写设备驱动的? Copy to clipboard
Posted by: ronnin
Posted on: 2004-09-29 12:19

ClownClownClown

2.Re:java 可不可以写设备驱动的? [Re: ronnin] Copy to clipboard
Posted by: landy
Posted on: 2004-09-29 13:07

效率不高!

3.Re:java 可不可以写设备驱动的? [Re: ronnin] Copy to clipboard
Posted by: littledeer1974
Posted on: 2004-10-26 09:36

http://forum.java.sun.com/thread.jsp?forum=52&thread=91756

The original author to this post did not give a specific
context of a "device driver".设备驱动程序

- A device driver could mean one as a postscript printer
driver. This could be a user level application in OS such
as Un!x or W!ndows. This would not need any hardware access,
the printer could be simply on an IP network.

If this is the case, the answer may be obvious. Perhaps this
was not the question. Anyway...

- Say the driver could be truely a hardware driver, but in
the Java OS. If this is the case, there is a book "Java OS"
which has some section(s) on device drivers. Dont remember
the authors for this book.

In anycase, these "Java OS" driver implementations could be
used as a reference to implement device drivers, even on non
Java OS platform - say Linux. It is quite possible that the
device a specific device may not be timing sensitive or has
large volumes of data exchanged. Ofcourse, JNI may the only
means of implementation in this case.

记得很久以前,想使用鼠标,就先在DOS下运行一下mouse.com(当然版本很多了),这时候,鼠标的状态(位置呀,拿个键按下了,或是松开了什么的)就回不断的被更新,并放到,内存中固定的地方,然后在用户(你的)程序里利用中断,来调用这信息就可以了

那您说的设备驱动是指mouse.com这样的程序呢还是
上边说的用户的程序呢?

通常驱动硬件的驱动程序,在一定程度上都做到了OS里,所以你对它的使用,就很象上边的使用鼠标的过程,那样恐怕只有利用JAVA的JNI了(直接用JAVA且ONLY JAVA可能就有点困难了)

关于JNI,你可以参照这里


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923