
I programmed my very first JavaFX package in NetBeans, and then I wanted to add sound, an mp3 music file, embedded in the jar, inside the jar, so that I could email the jar to my friends and the music would play on their computers. JavaFX EMBED an MP3 into the jar (in the jar) with NetBeans Help would be appreciated to get me out of this nightmare. I have also tried many different path names in case it was wrong with no luck, I also just tried to copy and paste the path name that i got in eclipse by going to properties ex: /b/src/hero.mp3. MediaPlayer player = new MediaPlayer( new Media(uriString)) String uriString = new File("C:\\Users\\Mike\\workspace\\b\\src\\hero.mp3").toURI().toString() I know this isn't fancy but I was just trying the basics. I would like to say that the FX lib is added where it should be.

I have basically copied this from someone who had it working. Currently I have something that should work but I get an error:Įxception in thread "main" : expected file name as argumentĪt .(Css2Bin.java:44) I have spent hours today looking up how to get some form of audio in eclipse and have had trouble every step of the way.
