HardwareSimulator.sh does not load (no error msg)

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

HardwareSimulator.sh does not load (no error msg)

Sweenu
Hello!

I'm on Arch Linux, i have jre8-openjdk installed and my HardwareSimulator.sh is executable but when I start it (./HardwareSimulator.sh) it just shows a white screen and no errors or whatsoever...

And if I run something like  "./HardwareSimulator.sh ../projects/01/And.tst" it outputs "Comparison failure at line 5" which I guess is not a normal behavior.

Does someone know where the problem could come from ?

Thank you,
Sweenu
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

ivant
Please make a copy of HardwareSimulator.sh and edit it in the following way:
  1. On line 23 (or thereabout) remove the & at the end of the line. Normally it will put the java process in the background, but we don't want that for now
  2. Add the following as a second line just below #!/usr/bin/env sh:
    set -x
    This will make bash display each command that it executes.
Now run the copy and paste the log here.
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

Sweenu
Thank you for your fast reply! Here's the output :

+ unset CDPATH
++ test -L ./copyHS.sh
++ echo ./copyHS.sh
+ script=./copyHS.sh
+ dir=/home/sweenu/nand2tetris/tools
++ dirname ./copyHS.sh
+ cd .
+ '[' '(' 0 -gt 1 ')' -o '(' '' = -h ')' -o '(' '' = --help ')' ']'
+ '[' 0 -eq 0 ']'
+ java -classpath :bin/classes:BuiltIn:bin/lib/Hack.jar:bin/lib/HackGUI.jar:bin/lib/Simulators.jar:bin/lib/SimulatorsGUI.jar:bin/lib/Compilers.jar HardwareSimulatorMain
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

Sweenu
In reply to this post by Sweenu
By the way I was wrong, only the GUI fails to work. The scripts works perfectly for testing.
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

ivant
The output looks OK. Didn't java print something as well?
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

Sweenu
No :/
This is the only thing that got logged out.
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

ivant
The only thing I can think of, is if you've installed the headless jre. This means that it is designed to run on a server does not include any GUI stuff in it. I still think it should have displayed something, though.

You can also get the last command (java -classpath ...) and try to run it directly and see what happens.
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

Sweenu
I am positive that I have the version with the GUI stuff in it but could it be trying to use the headless version anyway ?
I tried the command directly and there was no output and still this white screen of death.
Reply | Threaded
Open this post in threaded view
|

Re: HardwareSimulator.sh does not load (no error msg)

cadet1620
Administrator
You could also try running "java -version" from the terminal command line and check that it can identify itself.
My laptop says
[D:/TECS]
% java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode)
[D:/TECS]
%
Assuming that works, in your script with the trace flag set, comment out the java -classpath and put in the java -version command and see if it runs from the script and identifies itself.
# java -classpath "${CLASSPATH}:
java -version

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

Re: HardwareSimulator.sh does not load (no error msg)

Sweenu
Both of these things works :/ I don't quite understand what the problem is. I'm juste gonna use a distrib that has a desktop environnement i guess... just a window manager might not be enough for some reason.