EDIT: Long story short, the compiler has trouble working with spaces in directory names. The zip file for project 9 creates a directory called "project 09", so be sure to change this before compilation!
----------------------------------------------------------------------
Hi all,
I'm having a lot of trouble getting the supplied compiler to run through the terminal on a mac. No matter what input I give the compiler (running JackCompiler.sh), it prints out the contents of bin/help/compiler.txt followed by "Usage: java JackCompiler <Jack-dir or Jack-file-name>".
This is quite a confusing message as the shell file includes code to run the compiler's java class files inside the bin/lib/Compilers.jar file. There is no JackCompiler class file inside the tecs-software-suite-2.5 directory, making "java JackCompiler Jack-dir-path" invalid.
I've checked that the inputs are either valid directories or individual .jack files and tried using absolute paths. I've also unsuccessfully tried manually running the classes in the jar file. I took a look at the thread
http://tecs-questions-and-answers-forum.32033.n3.nabble.com/JackCompiler-doesn-t-work-on-Mac-td3788999.htmlwhich just explains how to run a shell file on a different directory. As a last resort, I re-downloaded the software suite, but got the same results.
Here's the exact output given when I run the shell file as described. The same output occurs when using absolute paths. ("project 09" is a directory in the same folder as tecs-software-suite-2.5, Square is a directory in project 09 holding several .jack files)
==================================================
(terminal):tecs-software-suite-2.5 USER$ ./JackCompiler.sh ../project\ 09/Square
Jack Compiler, Version 2.5
This program is part of the software suite that accompanies the book:
The Elements of Computing Systems
by Noam Nisan and Shimon Schocken
MIT Press, 2005
Book site: www.idc.ac.il/tecs
Software Architects: Yaron Ukrainitz and Yannai A. Gonczarowski
Usage instruction and tips can be found in the relevant book chapters.
Usage: java JackCompiler <Jack-dir or Jack-file-name>
==================================================
Any help would be much appreciated! -Keith