Take the 2-minute tour ×

I would like to avoid using native libaries if at all possible. Surely there is a better way to solve this issue for Linux, Windows and Mac OS X.

share|improve this question
add comment

2 Answers

Sorry, you're out of luck. You'll need JNI, and it'll be obnoxiously different for different platforms. The base java libraries cover tasks and hardware that are pretty much universal. CD drives weren't and aren't considered so.

share|improve this answer
add comment

You can use the Java Sound API. I believe this is part of java 5. This may allow you to do what you want to do.


here are some examples:


share|improve this answer
This solution appears to only work for Linux using the Tritonus implementation of the Java Sound API (it essentially provides a CDDA extension to the standard API). –  pmr Sep 17 '08 at 4:23
add comment

Your Answer


