bitrazor.com ...THE source for mediocre content                                      

TiVo HME How-To: Manage Multiple Eclipse Projects             

If you have a TiVo application of any complexity, you'll find it useful to create multiple projects in Eclipse to manage them.  Here are a few tips when doing that that I've found helpful:

  • Let's say you're working on Project1, which is your main TiVo app.  You want to create a second project, Project2, that maybe has a piece of functionality you want to work on (or maybe have someone else work on) but you want to use it in your main app.
     
    • If both Project1 and Project2 are in your Eclipse workspace, simply select Project1, right-click it and do 'Properties', then 'Java Build Path'.  Click the 'Projects' tab, then add 'Project2'.  Now you may use any Project2 classes in Project1.
       
    • To simplify things, you can create a JAR file out of Project2, then reference it externally from Project1.  Once the Project2 JAR is created, you can add a reference to it in Project1.  Select Project1, right-click it and do 'Properties', then 'Java Build Path'.  Click the 'Libraries' tab, then 'Add External JARs...'  Add the Project2 JAR file.
       
    • You may also choose to go one step further and actually make Project2's JAR file a part of Project1.  One way to do this is to make a new folder in Project1 called 'lib' (right click the project, do 'New - Folder').  Then, drag Project2's JAR file onto that 'lib' folder in Eclipse's Package Explorer.  The JAR will be copied into the project.  Then, right-click on Project1, do 'Properties', then 'Java Build Path'.  Click the 'Libraries' tab, then 'Add JARs...'  Add the JAR file from the 'lib' directory.

My Normal Process

Normally, when I'm developing code, I keep logically distinct development within their own projects, and use Project References between them as necessary.  I create JARs when I'm ready to deploy (covered in another how-to document).

                                                         Last updated: February 19, 2007