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?
java -version
. What path are you talking about? Sorry, I am still learning all the linux stuff – user3099265 Jan 10 '16 at 14:33