| 52 | |
| 53 | |
| 54 | '''Unfortunately, I'm just a C++ programmer and have no experience with Java. I have made some changes in the Mary source code -- how I can compile and test my changes?''' |
| 55 | |
| 56 | |
| 57 | make sure you have a recent (>= 1.4) Java SDK installed (try "javac |
| 58 | -version" on the command line). If you don't have it, get it from |
| 59 | http://java.sun.com. You also need the tool "ant", which you can get |
| 60 | from http://ant.apache.org. |
| 61 | |
| 62 | Assuming both is installed correctly, you can simply go to the MARY |
| 63 | install directory, and type: |
| 64 | |
| 65 | {{{ |
| 66 | ant |
| 67 | }}} |
| 68 | |
| 69 | This should read the file build.xml in the current directory (as a C++ |
| 70 | developer, think of it as a Makefile), and execute the default target, |
| 71 | which in this case is "jars". The system will compile all the .java |
| 72 | source files into .class files and package them into mary*.jar files in |
| 73 | the java/ subdirectory. If no errors occur, you should be able to |
| 74 | restart the server and your modified code should be taken into account. |
| 75 | If in doubt, add some |
| 76 | |
| 77 | {{{ |
| 78 | System.out.println("Hello world"); |
| 79 | }}} |
| 80 | |
| 81 | or |
| 82 | |
| 83 | {{{ |
| 84 | logger.info("Hello world"); |
| 85 | }}} |
| 86 | |
| 87 | statements into your code. |
| 88 | |
| 89 | If you do more than just a few minor edits, I highly recommend using an |
| 90 | integrated development environment like the open source Java IDEs |
| 91 | Eclipse or !NetBeans. Eclipse project specification files are included |
| 92 | with the OpenMary source package. |