0

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?

asked Jan 10, 2016 at 14:19
11
  • Does the user you are running your program as have the libjli,so file directory in its path? Commented Jan 10, 2016 at 14:30
  • I didn't run my program yet, I only tried java -version. What path are you talking about? Sorry, I am still learning all the linux stuff Commented Jan 10, 2016 at 14:33
  • who did you run java version as (pi)? Commented Jan 10, 2016 at 14:34
  • I did it in root and pi, all the same Commented Jan 10, 2016 at 14:35
  • if the path for the user you ran java version as does not have that file in its path it won't gind it Commented Jan 10, 2016 at 14:35

1 Answer 1

2

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!

answered Jan 10, 2016 at 15:42
1

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.