wiki:EclipseConfiguration

Version 7 (modified by sach01, 15 years ago) (diff)

--

HOW TO USE MARY IN ECLIPSE


This document describes how to import the MARY source code as a project into Eclipse. These steps are written based on Eclipse 3.5. They should work under linux and, with minor adaptations, under windows.

Dependencies:

There are two possibilities to get access to the MARY source code:

  • From the installed version of MARY TTS system

Precondition: You must have installed the MARY TTS system including the "source" package. We will refer to the installation directory (e.g., "/home/myself/MARY_TTS" on linux or "c:\Program Files\MARY_TTS" on windows) as $MARY_BASE.

Precondition: Checkout OpenMary from current trunk (Lets say checkout directory as $MARY_BASE )

$ svn checkout https://mary.opendfki.de/repos/trunk $MARY_BASE 

Ex:

$ svn checkout https://mary.opendfki.de/repos/trunk /home/myself/openmary 

Common instructions for Eclipse configuration:

  1. Verify/adapt a number of general settings in Eclipse. From the Eclipse menu, select "Windows"->"Preferences...". In the dialogue window that opens, verify/adapt the following settings:
    • Source file encoding: "Workbench"->"Editors"->"Text file encoding" must be UTF-8 (Note: may be under "General"->"Editors"->"Text Editors" -> "Spelling" on the Linux version of Eclipse)
    • Java version used: "Java"->"installed JREs" must be JAVA 1.5
    • Java source compatibility: "Java"->"Compiler"->"Compliance and Classfiles" "Use default compliance settings" must NOT be ticked; all of the following must be set to 1.5: "Compiler compliance level" "Generated .class files compatibility" "Source compatibility"
  1. Import the MARY-project in Eclipse: In Eclipse, select from the "File" menu "Import", then click on "Existing Project into Workspace". Click "Next", then "Browse" and select the mary directory $MARY_BASE (for example "/home/myself/MARY_TTS"). Then click "Finish". If you get errors about jar files missing, verify the project settings under "Project"->"Properties"->"Java build path"->"Libraries". Remove or "Add external JARs" as appropriate -- all required .jar files should be found under MARY_BASE/java.

At this stage, the code should compile without errors. Now, we need to add some more settings in order to start the MARY server from within Eclipse (e.g., for quick debugging).

  1. To define a run target: From the menu, select "Run"->"Run configurations..". Click "New" in order to add a Mary process: Name=Mary, "Main"->"Main class"=de.dfki.lt.mary.Mary In the "Arguments" tab, add the following lines into the "VM Arguments" field:

-Xmx256m -Dmary.base=$MARY_BASE -ea

If you don't use Java 1.5, you also have to add the following into the same field:

-Djava.endorsed.dirs="$MARY_BASE/lib/endorsed"

For debugging informations displayed in Eclipse, you also have to add the following:

-Dlog.tofile=false -Dlog.level=debug

If you don't plan to use the Tibetan voice, add:

-Dignore.tibetan.config

Click "Apply" to save these settings.

  1. If you click on "Run" now, the process (MARY Server) will start.

  1. If you want to start a MARY Client, open following link in web browser (ex: firefox 3.5)

http://HostName:59125/ (HostName = MARY Server running system; Ex: http://localhost:59125/)


Sathish Pammi ( Sathish.Pammi @T dfki.de )