Thank you so much for the help.
The result of running this command '/bin/sh +x ./HardwareSimulator.sh' on
java 11 is -
Error: Unable to initialize main class HardwareSimulatorMain
Caused by: java.lang.NoClassDefFoundError:
Hack/HardwareSimulator/HardwareSimulatorControllerGUI
After switching to 8 by this method -
bash-3.2$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
11.0.1, x86_64: "Java SE 11.0.1"
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
1.8.0_73, x86_64: "Java SE 8"
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
bash-3.2$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
bash-3.2$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
bash-3.2$ java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
And running the same command gives this error -
bash-3.2$ Error: A JNI error has occurred, please check your installation
and try again
Exception in thread "main" java.lang.NoClassDefFoundError:
Hack/HardwareSimulator/HardwareSimulatorControllerGUI
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException:
Hack.HardwareSimulator.HardwareSimulatorControllerGUI
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
On Tue, Apr 16, 2019 at 1:49 AM ivant [via Nand2Tetris Questions and
Answers Forum] <ml+s32033n4033083h94@n3.nabble.com> wrote:
> There are a couple of things you can try. First, this is an older project,
> so you may wish to try using Java 8 instead of Java 11.
>
> You can also start the hardware simulator with the following command (from
> the terminal):
>
> /bin/sh -x ./HardwareSimulator.sh
>
> and copy and paste the output here, to get further help.
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
>
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/HardwareSimulator-Errors-on-start-tp4033082p4033083.html> To unsubscribe from HardwareSimulator Errors on start, click here
> <
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4033082&code=Y2FsZGVyZXRlMTk4MEBnbWFpbC5jb218NDAzMzA4MnwxNzUwNjM5NTQ0>
> .
> NAML
> <
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>