我正在尝试从音频 URL 获取 AudioInputStream。此 URL 不是合格的 URL,因为音频文件位于我想使用音频输入流加载的项目中。但我收到了 java.net.MalformedURLException。有什么解决办法吗?以下是我的代码 public AudioClipPlayer() { try { AudioInputStream audio_inputstream=AudioSystem.getAudioInputStream("media/local/ua/on.wav"); catch (Exception e) { e.printStackTrace(); } }以下是例外java.net.MalformedURLException: no protocol: media/local/ua/on.wav
添加回答
举报
0/150
提交
取消