• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

How to build an existing project from source files.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24208
47
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24208
47
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Evacuate the building! Here, take this tiny ad with you:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic