From Greg Ayer: Hey everyone, As promised in class, here are the set up instructions to use DemeterF, including DemFGen, entirely in Eclipse. These steps are a bit over precise, but I figured better safe than sorry. Thanks to Mark for helping me make sure I got all the steps right. First go to the DemeterF website and download the demeterf.jar file. I recommend saving this file in the folder you plan to use as your workspace. Next, set up the JavaCC plug-in for Eclipse. This allows you to run the JavaCC compiler simply by right clicking on a .jj file and selecting the compile option. 1. Go to the Help > Software Updates… menu option. 2. Open the "Available Software" tab 3. Click "Add Site" 4. Enter this url (http://eclipse-javacc.sourceforge.net/) in the Location: textbox, then click OK 5. Expand the entry for the new site and its "Uncategorized" subtree. 6. Check the "JavaCC Feature" checkbox, then click Install 7. When the installation dialog opens, just click Next 8. Accept the terms and click Finish 9. Restart Eclipse Now you create a project and set it up to use DemeterF. This setup is on a project by project basis, you need to do this for each project you create. I'm sure there are some things you could set up as defaults for your workspace (like including the demeterf.jar file in the build path for all projects) but I don't know how to do that. Feel free to show me up by posting better steps than those outlined below. In Windows Explorer: 1. Set up the folder with the necessary files (must include the gen folder, even if it's empty) In Eclipse: 1. Go to the File > New > Java Project menu item. 2. In Contents section, select Create project from existing source 3. Click Browse and select the folder you set up in Windows Explorer, click OK 4. Name the project, then click the Next button 6. Open the Libraries tab and click "Add External Jars..." 7. Select the demeterf.jar and the IR2.0.jar (for the Relation class library) and click Open 8. Click Finish 9. Once the project opens, select the Run > Run Configurations... menu option 10. Double click "Java Application" in the left pane to create a new Java Application run configuration 11. Name the configuration DemFGen 12. Check the "Include system libraries when searching for Main" checkbox, then click Search 13. Type "DemFGen" in the search textbox to find the DemFGen class in the default package, click OK 14. Open the arguments tab and enter the following: "--mutable --dgp:ToStr:Print:Display program.cd program.beh gen" 15. Click Run (not Apply), and proceed even with the errors 16. Refresh the project in the package explorer 17. Exapnd the gen package 18. Right click theparser.jj and select "Compile with JavaCC" 19. *Go get a beer or tasty beverage of your choice 20. Enjoy not having to use the lab machines Notes on Running The Program: To run your program, right click on your Main class and select Run As... > Java Application To give the input to your program, open the Console (Alt+Shift+Q, c) Type in your input (or copy paste from the provided program.input file) and hit Ctrl+Z to enter an EOF (end-of-file) character. Once you type the EOF, the program will process the input. You could modify the Main class to create a FileInputStream (not sure if that's the correct class name in Java) to read in the program.input file, but I didn't take the time to do this. I found it easier to just copy paste for now. * Required Step _______________________________________________ csu670 mailing list csu670@lists.ccs.neu.edu https://lists.ccs.neu.edu/bin/listinfo/csu670