I am trying to install java on my raspberry pi following the instructions on: http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html, but at the instruction ./bin/java -version, I get Permission denied. I tried doing sudo ./bin/java -version, but I get command not found. I am logged in on the root, so I'm not sure what's happening.
- 497
- 1
- 5
- 17
2 Answers
Java 8 is available as an early release for the Raspberry Pi. This includes JDK8 and JavaFX 8 early release.
Checkout http://jdk8.java.net/fxarmpreview/
johnma@raspbmc:~$ /opt/jdk1.8.0/jre/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b36e)
Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode)
johnma@raspbmc:~$
Also, I suspect that you received program not found because the version of the executable was not compatible with the platform that you tried to run the executable on. I accidentally downloaded a JDK7 preview for ARM instead of the most current JDK8 preview and received the same "command not found" error that you did.
- 3,125
- 3
- 24
- 36
Ok, I found a way around it. It's probably very silly, but it seems to work.
I run apt-get install openjdk-6-jre, which bundles java and now I am able to call java -jar TCA.jar and it does the same io reading and writing as done on my desktop version (which helps with my debugging), but I am still testing the other objects in it. So far, I haven't found any issues.
- 497
- 1
- 5
- 17
-
Damn it, didn't really work. Most of the libraries I want to use (like a lot of the System) doesn't work. Think I need one tailored for raspberry pi – topherg Jan 18 '13 at 00:33
./bin/java, even though it goes to an elf file, it doesn't execute it which is the problem – topherg Jan 18 '13 at 00:36