I finally got a Java program that uses sound working in an executable jar file. I wrote on a PC running XP. I made sure the program ran fine with no other files by putting the program in a folder...
Type: Posts; User: cl2606
I finally got a Java program that uses sound working in an executable jar file. I wrote on a PC running XP. I made sure the program ran fine with no other files by putting the program in a folder...
JavaPF,
Thanks for the reply. I tried the above, again, but to no avail. I had it commented out to show that I had tried it, but it still didn't work. I thought it was something I was/wasn't...
Just curious if anyone uses a text editor such as PSPad or TextPad to write and compile their code and run the code from the command line.
This is kind of an extension from a previous post that I did. The following code I got from KevinWorkman and it deals with loading a wav file as a resource. I took Kevin's code and created a stand...
okay...I now understand a bit more about the getResource, etc. When Norm first suggested that I got stuck. getResourceAsStream returns an InputStream, no problem, I got that. But then I needed to...
Okay..I went to the original computer and moved the jar file into a folder by itself and it didn't work. I then added the wav files to the folder and it worked.
So, then back to the "new"...
I moved it to a completely different computer.
Here is the error I get:
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input str
eam from input file
at...
Okay, I got it working. I found the code at anyexamples.com that reads the file as a stream. It can be found here.
So I created an executable jar that runs and the sound works....on the computer...
No problem. Thanks for the help.
Curt
I placed printStackTrace in all the catch blocks but nothing is being thrown.
Here is the code after I briefly tried to getResourceAsStream working. It was a quick attempt before I got called...
Norm,
Thanks for the reply. There were no errors when I ran java -jar ... It is probably in that I'm reading the wav files as "files" and not using getResourceAsStream. Now I just have to...
I wrote a program that uses wav files. It works in Eclipse but when I create an executable jar file the sounds no longer plays.
Any ideas as to what's going on and the fix that is required?
...
Hello. This is my first post on this forum. I wrote a workout timer similar to this one that I wrote in Win32 C.
The program is all but done however I couldn't figure out how to sync the sounds...