1

I cannot find much about this. My college is using JGrasp, which I think is terrible from what I have heard from people using much better IDE's. My professor doesn't even use the JGrasp Project at all and makes us use .java files. I managed to code the program to play sound, but I have no clue where to put the file. I have been coding in c# and used Visual Studio for 3 years now, and I never had to deal with this. I placed it in the same folder as my other .java files, since I believe files can talk that way since .java files placed in the same folder in JGrasp is able to communicate to each other. I even placed it in my c drive to see if it even detects it, but still my audio file cannot be found

My first attempt was to place it here C:Users/ProfileName/Desktop/Project1/sounds/Medic_cheers05.wav

my final attempt was to place it here C:Medic_cheers05.wav

and it doesn't work no matter where I put my audio file.

I need help on WHERE to place the audio file. I really need help with this and it frustrates me. Other places I checked, but they all placed it in .jar related or project related problems. What if you don't want to use a jar or project? Can I see how this could work, if it is even possible?

TofuMars
  • 11
  • 2

1 Answers1

0

To be honest i have no idea. But what you can try is:

"C:\\Users\\ProfileName\\Desktop\\Project1\\sounds\\Medic_cheers05.wav"

When giving the filepath.

Keep in mind that the escape sequence \ is not recognized usually by the IDE. So you need to double the \ in order to work.
I also recommend you to always type in the full file path if the Programm is just for you.

And usually if you place the sound file in the same directory as the Java Project it should work.