-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding Exceptions during automatic testing #143
Comments
For Mac, set the |
I will get around to setting GitHub Actions CI here soon. I would look into something like https://github.com/marketplace/actions/gabrielbb-xvfb-action |
|
For headless Java, set |
If you need to install Java, then use something like https://github.com/actions/setup-java |
Thanks. This is in my steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '11' |
The issue is that JavaCall.jl does not know where adopt put Java, so you need to set the JAVA_HOME environmental variable where it got installed. |
The problem seems to be the X-Windows system under Linux. GitHub actions works pretty well. Even the installation of the x-windows system seems to run through but it always stops when trying to connect to |
Did you try aviks's comment above? Concretely, using JavaCall
JavaCall.addOpts("-Djava.awt.headless=true")
# Configure classpath here
JavaCall.init() |
More details on that here: |
Thanks for the hint! This causes other problems, but they are possibly fixable in my Java code.
I will fix this... |
Bad news: Even a simple |
Aren't applets deprecated as of Java 9? I'm not really sure if there is any way to still use them in a modern browser. https://www.oracle.com/technetwork/java/javase/migratingfromapplets-2872444.pdf |
I see |
Thanks for the hint. I wasn't really aware of this deprecation. So I changed the main class from extending
|
See https://www.oracle.com/technical-resources/articles/javase/headless.html For Linux, this can create a virtual X server: |
JavaCall throws a
java.awt.HeadlessException
in Linux systems due to a missing "X11" display specification, when Git-Hub automatic testing is performed. Does anyone know how to avoid this? Also on Mac the tests fail due to a missing java installation. Are there easy fixed for this?The text was updated successfully, but these errors were encountered: