i cant run the hardware simulator!!

classic Classic list List threaded Threaded
15 messages Options
guy
Reply | Threaded
Open this post in threaded view
|

i cant run the hardware simulator!!

guy
i downloaded the zip,extracted it ,have the java.when i click on the hardwaresimulator.bat it opens a gui and shuts it down immidiatly??
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

cadet1620
Administrator
guy wrote
i downloaded the zip,extracted it ,have the java.when i click on the hardwaresimulator.bat it opens a gui and shuts it down immidiatly??
Some things to check:

Make sure that there are no spaces in any of the directories along the path to your TECS tools directory.
Make sure you downloaded the Java RUNTIME, not the Java JDK.
Start cmd.exe and make sure that Java can be found on the path.  Type "java -version" at the command prompt and it should say something like
C:\>java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
--Mark
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

Calcien
I'm struggling here too.
Following this excellent book and Chpt 1 actually makes sense to me but I'm a cmd line noob really. Can anyone step me through how to get the .bat file to work - I get the same transient black window described above.
JRE is installed, what should I check next?

Neil
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

cadet1620
Administrator
Spaces in paths, and long path names can be a problem with Windows.  The most common problems being when programs are installed under "Program Files" or "Documents and Settings".  Use Explorer to create a C:\TECS directory (folder) and move the TECS tools directory into the C:\TECS directory you just created. Move the projects directory, too.

I find its easiest to then create a folder on your desktop named TECS that can hold shortcuts to the tools and documentation.  Right click and drag the .bat files from the C:\TECS\tools folder to your desktop TECS folder to create shortcuts.

--Mark
JJ
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

JJ
Hi I have tried the above steps and nothing, just the transient window that opens and immediately disappears. Is there anything else I can try?
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

ybakos
The HardwareSimulator.bat is running, reporting an error, and the console is closing -- all very quickly.

Open the Windows console:
Windows-R (that's the windows key and the 'R' key together)
cmd.exe

Now, change to the location of the tecs toolsuite, eg:

cd Desktop/tecs-toolsuite

(Google some help about using CD and the windows console if you get stuck.)

Invoke the hardware simulator directly:

HardwareSimulator.bat

And let us know what you see on the screen. (Copy and paste the whole error message you see)


JJ
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

JJ
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\JJ>cd C:\Tecs\nand2tetris\nand2tetris\tools

C:\Tecs\nand2tetris\nand2tetris\tools> HardwareSimulator.bat
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Tecs\nand2tetris\nand2tetris\tools> C:\Tecs\nand2tetris\nand2tetris\tools\Har
dwareSimulator.bat
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Tecs\nand2tetris\nand2tetris\tools>
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

cadet1620
Administrator
JJ wrote
C:\Tecs\nand2tetris\nand2tetris\tools> HardwareSimulator.bat
'java' is not recognized as an internal or external command, operable program or batch file.
It looks like the Java runtime is not installed on your computer, or there is a problem with the installation. Try [re]installing Java from http://java.com/en/download/

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

ybakos
In reply to this post by JJ
If you have installed Java, then you need to be sure that java.exe is on your path.

Do a google search for "add java to path on windows."

JJ
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

JJ
Thanks for the help, I added the java path and its working!
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

Bart
Youtube tutorial for setting the path to java on windows 7

worked like a charm for me!
http://www.youtube.com/watch?v=RkycwpimOEc
KI
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

KI
Also if you are running Win64 bits make sure you install 64-bit version of Java.
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

YAHAV
In reply to this post by ybakos
C:\Users\Nohar Avigal\Desktop\TECS>HardwareSimulator.bat
Error: Could not find or load main class HardwareSimulatorMain

that is what I got after installing 64bit JAVA, and after fixing the PATH
what shall I do?
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

cadet1620
Administrator
YAHAV wrote
C:\Users\Nohar Avigal\Desktop\TECS>HardwareSimulator.bat
Error: Could not find or load main class HardwareSimulatorMain

that is what I got after installing 64bit JAVA, and after fixing the PATH
what shall I do?
The HardwareSimulator.bat must be run from the 'tools' subdirectory. It contains relative paths to the class files.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: i cant run the hardware simulator!!

MaEstRo
In reply to this post by guy
I had the exact same problem and the HardwareSimulator.bat file started working after I installed both 32-bit and 64-bit versions of Java.
Just go the the Java download page (http://www.java.com/) and don't just let your browser choose the java version for you, manually download both versions and install them.