How to import class files when missing source file.

I have tried downloading some class files in EasyOgg to be able to use OGG sound files in my game. It works when I make it an application and the class files are positioned in the right folder from the executable.

BUT, when using Eclipse or JBuilder it will not compile it no matter how I import it. It will refuse because I do not have the source file so it will say those files are missing. How do I solve this since I do not have the source files?

Project Properties -> Java Build Path -> Libraries -> Add Class Folder

Normally you’d have your class files in a jar and add them like that.

Kev

I tried
project properties -> paths -> class path

but everything was grayed out, no button to add or modify the paths. I also tried the required libraries tab and added my “OGG Support” library that i created from the 2 jar files needed but it made no difference.

Try refreshing your project?

Strange, now the 2 jar files sudeenly work, I do not know if it was the refresh because I made some steps in between and when it started working. Might have been the update project. THANKS! :slight_smile:

doesnt EasyOGG come with source code o_O

EasyOgg comes with source code for creating and playing a clip, but the imports in the Clip.java file referres to stuff that just have .class files no source.

that stuff is JOrbis/JOGG. you can grab that here… it’s open source.

Is there any point in not using jar files? When I make install files for the game, it works with both folder or jar, and the EasyOgg files is just like ~60kb anyway so I guess it makes no difference if I use it as jar or folder?

i used it as a folder for beetle mania, but that’s only because i had made modifications to some of EasyOGG’s code and I didnt feel like re-bundling it into its own jar :slight_smile: