I'm having trouble running JackCompiler.sh. I'm using a computer running Ubuntu-Linux. The Hardware Simulator and the CPU Simulator both work but when I click on JackCompiler.sh nothing happens. No window shows up. I tried the option of running the program using the terminal but all that happened was the terminal window opened and closed immediately.
The directions (pg 197, softcover) say to "apply the compiler to the name of the program directory". Does that mean I should be doing something other than trying to run the JackCompiler.sh file?
Not being familiar with DOS, it took me quite a while to figure out how to use the JackCompiler.
So I hope the following will be of help to people.
I am working on a Windows machine with XP as the operating system
First of all unlike the HardwareSimulator, CPUEmulator, Assembler etc it won't do just to double click on the relevant .bat file.
All that will happen is the console window will appear momentarily and then vanish.
Instead follow the steps in the pic below
Click on the OK button and the compiler does its job. There is no GUI for the compiler
so it's only the creation of the vm files that tells you it's worked.
EDIT: AFAIK if you're using vista there's no 'run' button.
I think you just need to click on the equivalent of the start button (again in the bottom right corner
of the screen) and enter the text as above in the textbox control that then appears (just above the
I'm in the same boat. Culchie's suggestion works on Windows (using the JackCompiler.bat) but on a Mac, I am having trouble.
Using the command "bash JackCompiler.sh", I get the instruction screen ("Jack Compiler, Version 2.5 ... Usage: java JackCompiler <Jack-dir or Jack-file-name>").
Performing "java JackCompiler ./" yields a "Exception in thread "main" java.lang.NoClassDefFoundError: JackCompiler ... " error.
I have java version "1.6.0_22", so I don't know what I'm doing wrong.
Other than that great job, I've got to Chapter 9 on my own so far. Big Fan.
For those interested the full exception information:
d-172-25-253-176:project 09 joshnahum$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
d-172-25-253-176:project 09 joshnahum$ java JackCompiler ./Square
Exception in thread "main" java.lang.NoClassDefFoundError: JackCompiler
Caused by: java.lang.ClassNotFoundException: JackCompiler
at java.security.AccessController.doPrivileged(Native Method)