ybakos wrote
Instead of sh CPUEmulator.sh can you please try just ./CPUEmulator.sh
To do that, you first have to make it executable: chmod +x *.sh. But I don't think this is the problem. For me it works fine both ways.
Please, run it with bash -x CPUEmulator.sh and post what it logs. Here is what I see on my machine:
$ bash -x CPUEmulator.sh
+ unset CDPATH
++ test -L CPUEmulator.sh
++ echo CPUEmulator.sh
+ script=CPUEmulator.sh
+ dir=/home/ivan/src/my/n2t/nand2tetris/tools
++ dirname CPUEmulator.sh
+ cd .
+ '[' '(' 0 -gt 1 ')' -o '(' '' = -h ')' -o '(' '' = --help ')' ']'
+ '[' 0 -eq 0 ']'
+ java -classpath :bin/classes:bin/lib/Hack.jar:bin/lib/HackGUI.jar:bin/lib/Simulators.jar:bin/lib/SimulatorsGUI.jar:bin/lib/Compilers.jar CPUEmulatorMain