“java mp3 player” Kode Jawaban

mp3 player java

public void playSound() {
    try {
        AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("D:/MusicPlayer/fml.mp3").getAbsoluteFile());
        Clip clip = AudioSystem.getClip();
        clip.open(audioInputStream);
        clip.start();
    } catch(Exception e) {
        System.out.println("Error with playing sound.");
        e.printStackTrace();
    }
}
LoLGamer1002

java mp3 player

import java.io.File;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;

String bip = "song.mp3";
Media hit = new Media(new File(bip).toURI().toString());
MediaPlayer mediaPlayer = new MediaPlayer(hit);
mediaPlayer.play();
slapp kuk

Jawaban yang mirip dengan “java mp3 player”

Pertanyaan yang mirip dengan “java mp3 player”

Lebih banyak jawaban terkait untuk “java mp3 player” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya