Linux下的光驱开关[java]

用java写的一个光驱开关小程序,实现其实使用的是eject这个程序,主要做了个图形界面,有关eject的使用请参考man手册。

eject实现的原理其实也挺简单的,主要用到的ioctl这个函数,有兴趣可以看一下相关函数的说明,这个函数我还不是很了解。

查看代码
下载代码

UPDATE1:

  • 更新了源代码,修改了运行后在某些时候不能正常显示界面的问题(是因为setVisible位置不正确,应该在所有控件添加后使用)
  • 修改邮箱地址,以前那个竟然写错了!
This entry was posted in Java, 编程相关. Bookmark the permalink.

4 Responses to Linux下的光驱开关[java]

  1. 草儿 says:

    好像BUG还不断出现,测试效果不是很好

  2. cocobear says:

    TO:草儿

    什么样的问题?

  3. 草儿 says:

    反映太慢
    假死

  4. cocobear says:

    TO:草儿
    我不清楚这是为什么,好像我也遇到过。

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>