even thought java is backwards compatible, I have problems running my Java 6 application using JRE7.
First problem:
javax.sound.sampled.Clip simply doesn't work when I run using JRE7, but works perfectly when I run using JRE6.
AudioInputStream inputStream = null;
//Try statement
inputStream = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer));
clip = AudioSystem.getClip();
clip.open(inputStream);
if (delay > 0) {
Thread.sleep(delay);
}
clip.start();
//catch statement
On JR7, after clip.start(); clip.isRunning() returns false; which doesn't happens when running on JRE6
Second problem:
I compress my image pixels using java.util.zip.Inflater, however using JRE7, when read the pixels, the red channel comes wrong for some reason that I couldn't figure out.
Probably because Inflater use zip library (jre\bin\zip.dll) which is different between jre6 and jre7
Checked using: System.getProperty("java.version"):
Java Runtime Version: 1.6.0_24
Sound works perfectly
Images load perfectly fine
Java Runtime Version: 1.7.0_21
Sound doesn't work (Actually it randomly plays)
Images load perfectly fine
Java Runtime Version: 1.7.0-ea
Sound works perfectly
Images load with incorrect red channel.
Simple test:
Using this code for both java version: http://pastebin.com/WMCfh4Vp
Result:
- JRE-6: Works
- JRE-7: Doesn't play, say that clip is not running nor is active.
There's a way to turn around this problem?
Thank you.