I am trying to play an online WAV audio file from Java code.
My OS: Ubuntu 14.04. Java version: 8.
On my machine, it does play the file when I run the code from a stand alone java application.
But when I call this code from code that runs in Tomcat, I am getting the following exception:
Home directory not accessible: Permission denied
java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported.
at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:479)
Tomcat runs on my machine, as a service.
Why doesn't it work from Tomcat?