Tools not working on linux, launch empty window

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

Tools not working on linux, launch empty window

Zaphod118
Hello, I am having trouble getting the tools up and running on linux. I'm not new to linux, but new to Java so I am having trouble figuring out what exactly is going on. When I run any of the scripts, I don't get any errors or anything, just a blank empty window. I am running on Gentoo with sway wm as my graphical environment, if that is helpful.

I have OpenJDK installed, n2t scripts are executable. Output of java -XshowSettings below:


$ java -XshowSettings:properties -version
Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.endorsed.dirs = /opt/openjdk-bin-8.272_p10/jre/lib/endorsed
    java.ext.dirs = /opt/openjdk-bin-8.272_p10/jre/lib/ext
        /usr/java/packages/lib/ext
    java.home = /opt/openjdk-bin-8.272_p10/jre
    java.io.tmpdir = /tmp
    java.library.path = /usr/java/packages/lib/amd64
        /usr/lib64
        /lib64
        /lib
        /usr/lib
    java.runtime.name = OpenJDK Runtime Environment
    java.runtime.version = 1.8.0_272-b10
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = AdoptOpenJDK
    java.vendor.url = https://adoptopenjdk.net/
    java.vendor.url.bug = https://github.com/AdoptOpenJDK/openjdk-support/issues
    java.version = 1.8.0_272
    java.vm.info = mixed mode
    java.vm.name = OpenJDK 64-Bit Server VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = AdoptOpenJDK
    java.vm.version = 25.272-b10
    line.separator = \n
    os.arch = amd64
    os.name = Linux
    os.version = 5.4.97-gentoo
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /opt/openjdk-bin-8.272_p10/jre/lib/resources.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/rt.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/sunrsasign.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/jsse.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/jce.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/charsets.jar
        /opt/openjdk-bin-8.272_p10/jre/lib/jfr.jar
        /opt/openjdk-bin-8.272_p10/jre/classes
    sun.boot.library.path = /opt/openjdk-bin-8.272_p10/jre/lib/amd64
    sun.cpu.endian = little
    sun.cpu.isalist =
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    sun.os.patch.level = unknown
    user.country = US
    user.dir = /home/user/projects/nand2tetris/tools
    user.home = /home/user
    user.language = en
    user.name = user
    user.timezone =

openjdk version "1.8.0_272"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.272-b10, mixed mode)


any ideas on how to next troubleshoot? I've gotten this working on Mac and Windows in the past, but am now running exclusively Linux on my personal computers. Just looking for some things to try before I resort to spinning up a windows VM for this. Happy to provide more info, just not sure what to provide as I am not seeing any errors on executing the scripts.
Reply | Threaded
Open this post in threaded view
|

Re: Tools not working on linux, launch empty window

WBahn
Administrator
I can't offer much help, but I have seen similar problems posted and we have a few members that are knowledgeable about getting things worked out on Linux systems. Hopefully one of them will be by at some point to offer assistance. In the meantime, you might peruse the threads that are already here as you might find one that either addresses your issue directly, or at least gives you some hints on where to explore further. Good luck.
Reply | Threaded
Open this post in threaded view
|

Re: Tools not working on linux, launch empty window

Lozminda
In reply to this post by Zaphod118
Are you getting any errors on the command line, ie after

$ ./VMEmulator.sh

It brings up the VMEmulator window are there any errors being sent to the parent window. I'm running a slightly older version of java but on a 32 bit machine with a different architecture..

Unfortunately I'm just a user and don't know anything about the N2T java API. Do you have any other apps that "run in java" (I've got netbeans that runs using java) perhaps that'd be a test for the java, at least you could rule that out as an option.

I'd maybe try an older version of java, after that I'm done (not very helpful I know) (esp without an errors)

Good luck, sorry it's a bit useless and late !
Reply | Threaded
Open this post in threaded view
|

Re: Tools not working on linux, launch empty window

njcooke
In reply to this post by Zaphod118
This is the exact same thing for me. I've tried all the available versions of jre in the arch repositories. All scripts are executable. When called they just load a blank screen.
If you make any progress please let me know.
Reply | Threaded
Open this post in threaded view
|

Re: Tools not working on linux, launch empty window

ivant
One common problem with Java on Linux is that you might have installed the so called "headless" packages. These contain Java, but without any GUI support and are meant to run on a server. So first step might be to google "java headless <your-distro>" and see how to check.

Another thing you can try is to run the script with:
/bin/bash -x HardwareSimulator.sh
This will print each command that bash is running. It might help with finding the problem.

There are also more threads in this forum with similar problems. You can search a bit more and see what worked for the others.
Reply | Threaded
Open this post in threaded view
|

Re: Tools not working on linux, launch empty window

njcooke
Thanks, I had the gui version installed. However, for some window managers (like xmonad and awesome) people may need to set the environment variable _JAVA_AWT_WM_NONREPARENTING=1.

I.e. open .bashrc in your favorite text editor and paste

export _JAVA_AWT_WM_NONREPARENTING=1

this solved it for me.