Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to build an existing project from source files.

 
lanfan Petrov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

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.
 
lanfan Petrov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I tried to use the jar files, it seems to be alwrigh, but again there are hundreds of classes, and i have no idea which one to run in Eclipse, is there a way to recognize the launcher ?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic