I am a little white, but recently in the Linux system running LCM spy encountered a variety of error messages. Finally, after collecting all kinds of information on the Internet and a little bit of my imagination, I successfully solved the problem, so I want to share it with you and leave a file for myself, so as not to be at a loss when I encounter the same problem in the future.
First, follow the official LCM guidelines Before installing LCM, be sure to download its recommended default JDK. This automatic download is the latest version of Java (I don’t know much about Java, but it also seems to download javac). Bloggers download Java 11 by default. Note: Java 8 can’t run make successfully, at least the blogger failed.
Default JDK installation steps:
$ sudo apt update $ sudo apt install default-jdk
Then follow the steps to install according to the official website (cmake may say that some files in other languages cannot be found, but you can try to run make first)
$ mkdir build $ cd build $ cmake .. $ make $ sudo make install
If there is no error in make and make install, please check whether there is an LCM Java folder and whether there is lcm.jar in the folder under build. This is very important, because it determines whether you can run LCM spy
Next, you need to download Java 8 and change the default version of Java to Java 8. The method is as follows (the first and second behaviors download Java 8, and the third behavior change the version)
$ sudo apt-get update $ sudo apt-get install openjdk-8-jdk $ sudo update-alternatives --config java
Then select the number corresponding to Java 8 in the pop-up window and press enter:
Next, you need to move the lcm.jar to the Java folder. Note: the specific address varies from person to person. Please check the address of the Java folder in usr. Bloggers provide their own examples:
$ sudo cp ~/lcm-1.4.0/build/lcm-java/lcm.jar /usr/share/java/
In this way, you can find the LCM. Jar file in the Java folder. If there is no accident, you can run LCM spy and LCM logplayer GUI in any path.
1. Two versions of Java are needed because during the installation of LCM v1.4.0, Java related files only support Java 11 (maybe Java 10), but not Java 8. However, the operation of LCM spy does not support Java 11, because Java 11 has deleted an option named “xincgc” in Java 8, so it needs to change the Java version to Java 8 to run successfully;
2. A Java application notes in the official website Bloggers did not run successfully, so they have to manually copy LCM. Jar to the Java folder. If you are interested, you can also try whether the official website tutorial is useful.
- VTK installation
- Vs2012 compiling PCL dependency library vtk7.0
- CMake Error： Could not find CMAKE_ROOT !!!
- Installing GCC reduced version GCC 4.4.6 under Linux
- How to Use paho.mqtt.cpp
- Installing opencv and Linux Makefile:160 : recipe for target ‘all’ failed problem resolution
- The use of makefile in GoLand under Windows
- Vs2017 compiles pcl1.8.1 with vtk8.0 and uses qt5.9.5
- Install Java runtime JRE in Ubuntu 16.04
- Unable to resolve dependency tree
- Pangolin installation record
- Countermeasures for Error 1935 when installing MATLAB under Windows 10
- Vtk7. X is compiled and installed under vs2013 and vs2015
- OpenGL Programming Guide 8th Edition 9th Edition vs2015 vs2017 configuration method
- Could’t find path to unrear Library
- Vtk8.2.0 (32bit + 64bit) compilation and installation test (win10 + vs2017 + Qt5)
- Construction of vs2015 OpenGL configuration environment
- [VTK] vtk8.2.0 + vs2015 + win10 compilation and configuration
- In windows, “cmake” is not an internal or external command, nor a runnable program or batch file.
- [VTK] cmake compiling VTK