Giter Club home page Giter Club logo

Comments (9)

Stifael avatar Stifael commented on August 16, 2024 5

I assume you upgraded java version.
In case you have openjdk 11 (java --version), I would downgrade to 10 or 9. There was already a fix for 9/10, but not for 11 (cb2d130).

To downgrade your version:

  • download jdk-10 from here
  • unzip
tar xzvf openjdk-10_linux-x64_bin.tar.gz
  • move jdk-10 to install directory and update version to 10.
sudo mkdir -p /usr/lib/jvm/java-10-openjdk-amd64/
sudo mv jdk-10 /usr/lib/jvm/java-10-openjdk-amd64/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/javac 1
sudo update-alternatives --config java
  • remove jmavsim build folder
rm -rf <path-to-px4>/Tools/jMAVSim/out

Now you should have your GUI back.

NOTE: this is just a workaround and not a fix.

from jmavsim.

julianoes avatar julianoes commented on August 16, 2024 3

For Ubuntu, you can fall back to Java 8 quite easily:

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out

from jmavsim.

julianoes avatar julianoes commented on August 16, 2024 3

Thanks for adding that, also see: PX4/PX4-Autopilot#9557 (comment)

from jmavsim.

Ahmad-Drak avatar Ahmad-Drak commented on August 16, 2024

Same issue. Did you manage to fix it?

from jmavsim.

Stifael avatar Stifael commented on August 16, 2024

same issue

from jmavsim.

Ahmad-Drak avatar Ahmad-Drak commented on August 16, 2024

Thanks for the workaround, will git it a try

from jmavsim.

Ahmad-Drak avatar Ahmad-Drak commented on August 16, 2024

@Stifael jdk-10 didnt work for me, however jdk-9 did work. Thanks for the help

from jmavsim.

louzq16 avatar louzq16 commented on August 16, 2024

I assume you upgraded java version.
In case you have openjdk 11 (java --version), I would downgrade to 10 or 9. There was already a fix for 9/10, but not for 11 (cb2d130).

To downgrade your version:

  • download jdk-10 from here
  • unzip
tar xzvf openjdk-10_linux-x64_bin.tar.gz
  • move jdk-10 to install directory and update version to 10.
sudo mkdir -p /usr/lib/jvm/java-10-openjdk-amd64/
sudo mv jdk-10 /usr/lib/jvm/java-10-openjdk-amd64/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-10-openjdk-amd64/jdk-10/bin/javac 1
sudo update-alternatives --config java
  • remove jmavsim build folder
rm -rf <path-to-px4>/Tools/jMAVSim/out

Now you should have your GUI back.

NOTE: this is just a workaround and not a fix.
thank you for your help!! It works well now~

from jmavsim.

yuhaim avatar yuhaim commented on August 16, 2024

For Ubuntu, you can fall back to Java 8 quite easily:

sudo apt install openjdk-8-jdk
sudo update-alternatives --config java # choose 8
rm -rf Tools/jMAVSim/out

This solution works for me finally, but there is another issue as follow:

Options parsed, starting Sim.
Starting GUI...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
at java.awt.Window.getToolkit(Window.java:1358)
at java.awt.Window.init(Window.java:506)
at java.awt.Window.(Window.java:537)
at java.awt.Frame.(Frame.java:420)
at java.awt.Frame.(Frame.java:385)
at javax.swing.JFrame.(JFrame.java:189)
at me.drton.jmavsim.Visualizer3D.(Visualizer3D.java:107)
at me.drton.jmavsim.Simulator.(Simulator.java:176)
at me.drton.jmavsim.Simulator.main(Simulator.java:895)
... 5 more

This could be solved by https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror

from jmavsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.