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.
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.
- First, click on Workbench:
- Select New Project:
- Select CVS. We are getting MascoptDev from the CVS repository:
- Enter the CVS parameters. We use the ssh protocl to access to CVS:
- Select the project you want to get that is in our case "mascoptDev":
- Keep the first choice (use the wizard):
- You may change your workspace location (where mascoptDev is put and used by eclipse):
- Here you can select a branch. Select nothing (it means by default, the HEAD):
- Select the Java project Wizard:
- Put the name of the project managed by eclipse (for example "mascoptDev"):
- 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":
- You obtain this:
- At this point, click on "Finish". Eclipse will download mascoptDev via CVS:
- 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 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.
- Right click on "mascoptDev" to access the properties and click on "Properties" :
- 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:
- Go to the "Builders" section. Disable the Java Builder. Then, create one builder clicking "New":
- Select ant here:
- Put a new name to your builder, like "ant builder". Then click on "Browse Workspace":
- You can find here the rules to build mascoptDev. These rules are in the file "build.xml".
Select it and validate:
- You want to refresh when programming. Enable the "Refresh ressources upon
completions" in the tab "Refresh".:
- Your builder is configured. Now validate this view clicking "Ok":
- Now, switch to "Java Build Path" from this view:
- We will specify where are the sources. Remove any entry here. Then, click "Add Folder":
- Select the three following folders: samples, src, and tests:
- Now, you must specify the output folder. At the bottom click on "Browse":
- In the popup, specify "classes". The directory may not exist; it will
be automatically created:
- Switch to the Libraries tab. Here you have to add extra ressources to be able to compile
mascoptDev. Click on "Add Jars":
- Select these jars and validate:
- Now you have the needed external libraries. If you have cplex solver click on "add external jars":
- If cplex is installed somewhere, find it and select cplex.jar:
- If this occurs, apply:
- 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 :
You are now ready to use Eclipse !
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".