So, I have got an assignment from university, to choose a project from www.sourceforge.net and build/compile/run it. The problem is that after I download the source files, I do not now on which one I need to run javac from the command line, so that I compile the whole project. There are hundreds of java files, and most projects do not have a proper readme file. In addition if I import the project into Eclipse using a Build.xml (most projects have one), I get over 100 errors and have no idea how to fix them.
Any help would be appreciated.
Using the build.xml file is definitely on the right track. You're probably just missing dependencies -- JAR files that Eclipse needs to know about, and that you might need to download separately. Check out whatever documentation you can find with the project as far as other libraries you'll need, and when you've exhausted that, you can cut-and-past some of your errors in a reply to this thread, and we can help you sort them out.
Depends on the project, and how it's set up. If it's actually a standalone application, then there's likely to be documentation on how to start it; or if the build.xml file contains a target to build a jar file itself, then the jar has to specify the main file, and you could start it with
java -jar jarfile.jar
But many projects are themselves libraries -- not applications at all, nothing to launch. Or they are web-based applications, in which case there's probably a WAR file to install into a web container like Tomcat. It really depends on the project. Again, we'd be glad to offer more specific advice in a less hypothetial situation!
subject: How to build an existing project from source files.