Ubuntu 16.04中Bonnmotion安装:Java二进制路径错误排查
Hey there! Let's work through this Java path issue you're hitting with Bonnmotion on Ubuntu 16.04. Here's how to locate your Java binary and resolve the prompt:
Finding the Java Binary Path
First, let's track down where your Java executable lives—here are the common spots and commands to find it:
- Default OpenJDK locations: Ubuntu 16.04 typically ships with OpenJDK 8, which lives under
/usr/lib/jvm/. A common full path would be something like/usr/lib/jvm/java-8-openjdk-amd64/bin/java. - Manual Oracle JDK installs: If you installed Oracle JDK manually, it might be in
/opt/java/or/usr/local/java/, e.g.,/opt/java/jdk1.8.0_291/bin/java. - Use terminal commands to find it automatically:
- Run
which java—this will show the system's default Java symlink (usually/usr/bin/java). - To get the actual binary path behind the symlink, run
readlink -f $(which java). Copy the output of this command—this is your real Java binary path.
- Run
Step-by-Step Troubleshooting & Fixes
Let's make sure Java is set up correctly and configure Bonnmotion to use it:
- Verify Java is installed:
Runjava -versionin your terminal. If you see a version number (likeopenjdk version "1.8.0_382"), Java is installed. If you get a "command not found" error, install OpenJDK 8 first with:sudo apt-get update && sudo apt-get install openjdk-8-jdk - Provide the path to Bonnmotion:
When the terminal promptsplease enter Java Binary path, just paste the path you copied fromreadlink -f $(which java)and hit Enter. Bonnmotion should now launch. - Set the path permanently (optional):
To avoid entering the path every time, edit the Bonnmotion startup script:- Find the
bonnmotionscript (usually in/usr/local/bin/or your custom installation directory). - Open it with a text editor (e.g.,
sudo nano /usr/local/bin/bonnmotion). - Look for a line starting with
JAVA_BIN=—replace the empty value or placeholder with your Java binary path, like:JAVA_BIN="/usr/lib/jvm/java-8-openjdk-amd64/bin/java" - Save the file (Ctrl+O, then Enter in nano) and exit (Ctrl+X). Now Bonnmotion will use this path automatically.
- Find the
- Check permissions (if needed):
If you hit a permission error, ensure the Java binary is executable:sudo chmod +x /path/to/your/java/binary
Verify the Fix
Run bonnmotion again—you shouldn't see the Java path prompt anymore, and the program should start normally.
内容的提问来源于stack exchange,提问作者Arvind aru
相关产品推荐
相关产品推荐

