views:

179

answers:

2

I downloaded JGraphT, and I want to make some changes to the core files. I'm using Eclipse. It wants a .jar or .zip to attach source files to the .class file. I have the .java file, but I'm not sure what I should do. Do I edit it, then recompile the jar?

+3  A: 

I would start by going to the Sourceforge Developer tab for JGraphT, and follow the instructions on checking out the latest source code :

 svn co https://jgrapht.svn.sourceforge.net/svnroot/jgrapht jgrapht

Then create a project in Eclipse from the sources, and read through the README on how to build and deploy.

Amir Afghani
A: 

When you add a jar or zip file containing the sources for a jar you are using, it is just to be able to view the sources; you are not able to edit them this way.

If you want to make changes to a library jar, you will need to get the source separately and either add them to your project, or create a new project with them.

You could then either create a new jar with your changes and add that to your projects build path, or if you are going to be making changes often you could make your project dependent on the new one.

matt