如何在 Eclipse 项目中将 SPI 添加到 java 声音?
我正在制作一个类似 java 应用程序的媒体播放器,并且使用一堆不同的 SPI 来提供对各种音频类型的支持。我希望添加它们就像将它们复制到我的项目中一样简单,然后将它们添加到构建路径中,但当我尝试调用时,我仍然收到“javax.sound.sampled.UnsupportedAudioFileException” AudioSystem.getAudioInputStream(文件)。我正在尝试使用 MP3SPI (http://www.javazoom.net/mp3spi/mp3spi.html) 播放 MP3 文件。我还将这些 jar 复制到了 java lib/ext 目录中,但我仍然没有任何运气。知道会发生什么吗?
I'm making a media player like java application and I'm using a bunch of different SPIs to provide support for various audio types. I was hoping that adding them would be just as easy as copying them into my project, then adding them to the build path, but I'm still getting an "javax.sound.sampled.UnsupportedAudioFileException" when I try to make a call to AudioSystem.getAudioInputStream(file). I'm trying to play an MP3 file using the MP3SPI (http://www.javazoom.net/mp3spi/mp3spi.html). I've also copied the jars into the java lib/ext directory, but I'm still not having any luck. Any idea what could be up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定该回答您的两个帖子中的哪一个。我认为通常不鼓励转发。
我查看了 i.imgur.com/0oeUi.jpg,并且想知道:JLayer 和 Tritonius jar 在哪里?该 spi 的文档指出:
http://www.javazoom.net/mp3spi/documents.html
这些 jar 位于Javazoom 下载的 lib 目录。
I wasn't sure which of your two posts to answer. Usually reposting is discouraged, I think.
I looked at i.imgur.com/0oeUi.jpg, and am wondering: where are the JLayer and Tritonius jars? The documentation for this spi states:
http://www.javazoom.net/mp3spi/documents.html
These jars are in the lib directory of the Javazoom download.
将 SPI 添加到应用程序的运行时类路径。
Add the SPI to the run-time class-path of the app.