Eclipse

the dude
2012-03-28
2013-02-12
  • the dude
    the dude
    2012-03-28

    I am having trouble running this project using the latest Eclipse IDE software on my Mac10.5.8. I'm guessing it has to do with not having set up the project correctly in Eclipse, and possibly not having setup the Run Configuration correctly. ??

    I downloaded the latest JDK, Eclipse IDE, Apache Ant, and MovieManager.v.X.X.X.X.src.zip.
    I unzipped MovieManger source to a local folder.
    I opened Eclipse and chose File -> New -> Project, chose Java -> Java Project from Existing Ant Buildfile.
    I clicked the Browse button next to the Ant buildfile text box, and navigated to the source directory (which unzipped as MeDs-Movie-Manager-Source) that contains the .classpath and .project, and selected the build.xml file there.
    The project name and "javac" task found in target "compile" were automatically populated.
    I checked the box "Link to the buildfile in the file system" (don't know if this is necessary), and clicked Finish.
    Eclipse loaded the project workspace.
    I click on the green Run button and a Run Configuration window pops up.
    The Run button is grayed out until I use the Search button to select a Main Class.
    I have tried several Main Classes, but don't know what I'm doing here.

    Another note, when I run through the steps mentioned above the contents of \MeDs-Movie-Manager-Source\MovieManager\ are emptied when I click Finish after selecting build.xml in Eclipse, and I have to manually copy the contents back from the zip file. I don't understand if these files are automatically re-created when I successfully build and run, or otherwise.

    Thanks in advance.

     
  • Bro
    Bro
    2012-03-28

    Hi

    You're right, there is no launch configuration included in the source. To launch, expand the MovieManager/source/net.sf.xmm.moviemanager and right click MovieManager.java and choose "Run As->Java Application"

    However, it's better if you get the source by SVN, as the MovieManager.v.2.9.1.3.src.zip doesn't include the latest updates to the IMDbLib. Also, I added a launch configuration, so that it should work out of the box.

    If you have an SVN plugin installed in Eclipse, do this:
    1) Click File -> Import (In Eclipse Menubar)
    2) In the new window, expand SVN and choose "Checkout Projects from SVN"
    3) Choose "Create a new repository location" and enter URL: https://xmm.svn.sourceforge.net/svnroot/xmm
    4) Expand "trunk" and select "MeDs", and click press "Finish" (Or "Next" if you'd like to configure workspace and project name, however, I believe the project name must remain XMM_SVN for the new default run-configuration to work).

    Eclipse should start to download source for you.

    If you'd like to use an external SVN client, you can open the project in Eclipse with:
    1) Click File -> Import (In Eclipse Menubar)
    2) General->"Existing Porjects into Workspace", and click "Next"
    3) Choose root directory of the project on the disk (The one contaning build.xml)
    4) Click Finish

    I'm this testing with Eclipse 3.7.2 on Linux, so I'm not sure if it's different on Mac.

    Bro