Installing mascopt in Eclipse

Why Eclipse ?

We discuss hear about the way to use mascopt in Eclipse. Eclipse is an IDE which helps to develop java (and other) projects. This section provides the main operation to install mascopt in Eclipse.

Getting Eclipse

Retrieve the full version of Eclipse, including the java and cvs tools. You can find eclipse at here. Be sure to take the full tar.gz, for SDK. At the time of writting this page it is eclipse-SDK-3.1M3-linux-gtk.zip.

Unzip eclipse somewhere. Then, you have to run it:

cd eclipse
./eclipse

You may have to set the environnement variable "JAVA_HOME". Note also that eclipse needs a recent version of Java.

Step by step install

Now, we provides some screenshots to help you to install mascopt cleanly in mascopt.

  1. First, click on Workbench:
    step by step screenshots
  2. Select New Project:
    step by step screenshots
  3. Select CVS. We are getting MascoptDev from the CVS repository:
    step by step screenshots
  4. Enter the CVS parameters. We use the ssh protocl to access to CVS:
    step by step screenshots
  5. Select the project you want to get that is in our case "mascoptDev":
    step by step screenshots
  6. Keep the first choice (use the wizard):
    step by step screenshots
  7. You may change your workspace location (where mascoptDev is put and used by eclipse):
    step by step screenshots
  8. Here you can select a branch. Select nothing (it means by default, the HEAD):
    step by step screenshots
  9. Select the Java project Wizard:
    step by step screenshots
  10. Put the name of the project managed by eclipse (for example "mascoptDev"):
    step by step screenshots
  11. Eclipse automatically propose to search sources in the tree directory. We propose to specify it later. Remove the entry you see in the tab "Sources":
    step by step screenshots
  12. You obtain this:
    step by step screenshots
  13. At this point, click on "Finish". Eclipse will download mascoptDev via CVS:
    step by step screenshots
  14. Then, you can browse the files. Now, you can go to the next section to learn how to configure Eclipse to be able to compile mascoptDev:
    step by step screenshots

Step by step configuration

Now, we provides some screenshots to help you to configure mascopt cleanly in mascopt. It allows to compile mascoptDev using ant. If ant is not installed, please install it before processing.

  1. Right click on "mascoptDev" to access the properties and click on "Properties" :
    step by step screenshots
  2. You get this. If the sections concerning Java are not here, your eclipse installation is not complete. You should download an other ecplise distribution containing the java tools:
    step by step screenshots
  3. Go to the "Builders" section. Disable the Java Builder. Then, create one builder clicking "New":
    step by step screenshots
  4. Select ant here:
    step by step screenshots
  5. Put a new name to your builder, like "ant builder". Then click on "Browse Workspace":
    step by step screenshots
  6. You can find here the rules to build mascoptDev. These rules are in the file "build.xml". Select it and validate:
    step by step screenshots
  7. You want to refresh when programming. Enable the "Refresh ressources upon completions" in the tab "Refresh".:
    step by step screenshots
  8. Your builder is configured. Now validate this view clicking "Ok":
    step by step screenshots
  9. Now, switch to "Java Build Path" from this view:
    step by step screenshots
  10. We will specify where are the sources. Remove any entry here. Then, click "Add Folder":
    step by step screenshots
  11. Select the three following folders: samples, src, and tests:
    step by step screenshots
  12. Now, you must specify the output folder. At the bottom click on "Browse":
    step by step screenshots
  13. In the popup, specify "classes". The directory may not exist; it will be automatically created:
    step by step screenshots
  14. Switch to the Libraries tab. Here you have to add extra ressources to be able to compile mascoptDev. Click on "Add Jars":
    step by step screenshots
  15. Select these jars and validate:
    step by step screenshots
  16. Now you have the needed external libraries. If you have cplex solver click on "add external jars":
    step by step screenshots
  17. If cplex is installed somewhere, find it and select cplex.jar:
    step by step screenshots
  18. If this occurs, apply:
    step by step screenshots
  19. Then click on "ok" to finish the configuration. Eclipse will build the project. If an error occurs when compiling, you may returns to the configuration of sources and jars :
    step by step screenshots

You are now ready to use Eclipse !

Additional tips

If you want to autobuild the project each time a file ressource is updated and saved, go to: Project Properties, Builders, your ant builder, then the tab build options and enable "During Auto Builds". Then close the Builder and in the menu "Project" enable "Build Automatically".