# Editing Java *.class files



## Raddy13 (Aug 6, 2009)

I'm trying to edit an open source game (Risk) and make some minor adjustments to the UI, but I've never edited an existing Java application before so any help would be appreciated. 

I located what I believe are the source files in the installation directory, marked "Risk.jar" I unzipped it into a separate folder. It contains a bunch of directories filled with *.class files that appear to be the game files, but I can't figure out how to edit them. I've googled around but of the results seem to be about recompiling the class files or working with class files you've created rather than editing existing files. I've tried opening the files in Eclipse IDE but it gives me an error and won't open them. Any help is greatly appreciated


----------



## Raddy13 (Aug 6, 2009)

Update: I stopped being an idiot and located the correct source files, several directories of *.java files. I've edited them and now I can't seem to compile them back into a game. Each time I run it, the UI appears without any of the changes I've made.


----------



## dm01 (Oct 10, 2006)

What program did you use to edit the files?
Which compiler are you using?
Did you get any error messages during the build/compilation?


----------



## shuuhen (Sep 4, 2004)

Where did you get the Java source files from? If they were in the JAR, you might want to try getting the source from the game's web site. If the game is open source, you should be able to download the source along with the project files (Ant, Eclipse, CMake, etc). The source distribution may also include build instructions.


----------

