user112829
user112829

Reputation: 531

Trying to write Java program to play mp3 file

I am trying to write a program that plays an mp3 file. For some reason, I am getting the error "package.javafx.scene.media does not exist." How can I fix this?

Upvotes: 1

Views: 131

Answers (2)

Lukas Leitinger
Lukas Leitinger

Reputation: 631

You could also work with Java 8 as JavaFX is already included there. It also provides a lot of improvements on JavaFX components.

Upvotes: 1

An SO User
An SO User

Reputation: 24998

You need e(fx)clipse or you need to add the jfxrt.jar to your classpath. It comes with your JDK.
How do I work with JavaFX in Eclipse Juno? should sort it out for you. NetBeans and IntelliJ come with built-in support for JavaFX.

Upvotes: 4

Related Questions