OK. Let me start. I am busy making a musical floppy player, connected everything up to my Raspberry Pi, and wrote a Java program to control it. I used OpenJDK 7 on Raspbian Jessie Lite. Then I took a break from the Pi, and continued the program on my workstation. When I loaded it onto the Pi, it froze. Turns out OpenJDK doesn't like MIDI sequencers. So I uninstalled OpenJDK, and went through a hard time trying t oinstall the Oracle JDK. I tried:
- PPA's (webupd8): turns out there isn't a version for jessie
- i586, x64 JDK's: I was too stupid
Finally I arrived at the Oracle Java SE 7 JDK for ARM. Downloaded tar.gz, scp'ed to Pi, extracted with tar
to /usr/lib/jvm
. Used (while in root)
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_60/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_60/bin/javac" 1
chmod a+x /usr/bin/java
chmod a+x /usr/bin/javac
and all went perfectly. Then I tried java -version
and got:
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
I checked, there is definitely a libjli.so
in /usr/lib/jvm/jdk1.7.0_60/lib/arm/jli
and /usr/lib/jvm/jdk1.7.0_60/jre/lib/arm/jli
Any ideas?
1 Answer 1
Got it working. Turns out some weird stuff was happening with the permissions, so I installed Java 8 and it worked fine. Thanks Steve Robillard!
-
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review2016年01月10日 16:03:58 +00:00Commented Jan 10, 2016 at 16:03
Explore related questions
See similar questions with these tags.
java -version
. What path are you talking about? Sorry, I am still learning all the linux stuff