Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessError : Update to static final field de.ralleytn.simple.audio.Audio.$SWITCH_TABLE$de$ralleytn$simple$audio$FileFormat #4

Open
exoad opened this issue Jun 10, 2022 · 3 comments

Comments

@exoad
Copy link

exoad commented Jun 10, 2022

Main error message:
Exception in thread "main" java.lang.IllegalAccessError: Update to static final field de.ralleytn.simple.audio.Audio.$SWITCH_TABLE$de$ralleytn$simple$audio$FileFormat attempted from a different method ($SWITCH_TABLE$de$ralleytn$simple$audio$FileFormat) than the initializer method <clinit> at de.ralleytn.simple.audio.Audio.$SWITCH_TABLE$de$ralleytn$simple$audio$FileFormat(Audio.java:50) at de.ralleytn.simple.audio.Audio.getAudioInputStream(Audio.java:238) at de.ralleytn.simple.audio.StreamedAudio.open(StreamedAudio.java:288) at Audiotestable.main(Audiotestable.java:18)

My code:

import de.ralleytn.simple.audio.*;


public class Audiotestable {
  public static void main(String... args) {
    Audio audio;
    try {
      audio = new StreamedAudio(Default.MUSIC_FILE);
      audio.addAudioListener(event -> {

        if (event.getType() == AudioEvent.Type.REACHED_END) {

          event.getAudio().close();
        }
      });
      audio.open();
      audio.play();
    } catch (AudioException e) {
      e.printStackTrace();
    }

  }
}
@exoad
Copy link
Author

exoad commented Jun 10, 2022

Ok probably a dead repo, but just putting it here just in case anyone else stumbles upon it:
The binary (*JAR) released in the releases tab seems to be out of sync with the one as source, thus if you are going to use this, make sure to compile it yourself with dependencies instead of downloading the pre-existing one.

I tried this with a homemade compiled JAR and it worked flawlessly.

@exoad
Copy link
Author

exoad commented Jun 10, 2022

Some other information about my system:
Java 16-Correto 64bit

@exoad
Copy link
Author

exoad commented Jun 10, 2022

I think I will PR a new binary that correlates with the source code from my fork of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant