Results 1 to 5 of 5

Thread: Open cd drive in JAVA

  1. #1
    Banned
    Join Date
    Aug 2003
    Posts
    130

    Open cd drive in JAVA

    During my computer science class my friend and i were wondering how to open a cd-rom door in JAVA. This is only for curiosity reasons. We didnt ask our teacher because we knew he wouldnt know. He didnt know how to change the text in a textbox so i doubt he would know this.

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    Im not big on Java, but theres no standard Java api functions for doing this...

    You'll have to use a runtime exec method apparently (I asked my friend) Im not to sure what it means but my google will help with that...

    i2c

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    Im not big on Java, but theres no standard Java api functions for doing this...

    You'll have to use a runtime exec method apparently (I asked my friend) Im not to sure what it means but my google will help with that...

    i2c

  4. #4
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    AFAIK, you can't do that with Java per se. However, you can either use Runtime.exec() which is unpredictable to say the least or use JNI, which is pretty much a pain to use. JNI is probably your best bet though because you can actually write the function in C/C++ and call it from within Java.

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  5. #5
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    AFAIK, you can't do that with Java per se. However, you can either use Runtime.exec() which is unpredictable to say the least or use JNI, which is pretty much a pain to use. JNI is probably your best bet though because you can actually write the function in C/C++ and call it from within Java.

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •