aspose file tools*
The moose likes Beginning Java and the fly likes How to build an existing project from source files. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to build an existing project from source files." Watch "How to build an existing project from source files." New topic
Author

How to build an existing project from source files.

lanfan Petrov
Greenhorn

Joined: Oct 12, 2009
Posts: 2
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

Joined: Jul 08, 2003
Posts: 24166
    
  30

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.


[Jess in Action][AskingGoodQuestions]
lanfan Petrov
Greenhorn

Joined: Oct 12, 2009
Posts: 2
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

Joined: Jul 08, 2003
Posts: 24166
    
  30

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to build an existing project from source files.
 
Similar Threads
Possible to change where Maven builds war from?
What is the of Build Tool?
Eclipse + ANT building EAR project - best practices? Manuals?
Subproject .class dependencies
how to compile using Eclipse