I am using Raspberry PI Zero W. I installed java 1.8 and 1.9 jdk's. Installation is successfully done. When i run the JAVA command on the RPi. Its shows error like: "Error occurred during initialization of VM Server VM is only supported on ARMv7+ VFP"
Please give me solution on the error?
4 Answers 4
If you have installed java 8 and still can't seem to get the VM to run then try:
sudo update-alternatives --config java
Select java 8's menu number
Java 8 should work just fine thereafter
It looks like Oracle has not released an up-to-date Java build that supports the BCM2835 (the CPU in the Pi Zero W). (See Cannot execute or open .jar files, Raspberry Pi 0 W and armv6.)
It looks like there are three options in this instance. 1) Switch to a Raspberry Pi 2 or newer, which have an ARMv7 or better, and support the official JDK. 2) Switch to OpenJDK, an alternative to Oracle's JDK. 3) Try the old Java SE Embedded.
sudo apt-get update
sudo apt-get install openjdk-7-jdk
Download the latest release from Oracle's website, which at the time of writing this is ejdk-8u211-linux-arm-sflt.tar.gz. Unfortunately you'll need to register to do this. Extract it using tar zxvf ejdk-8u211-linux-arm-sflt.tar.gz
. To run java then cd jdk*/bin
and then java -version
to get started.
-
Oracle actually did have a release for ARMv6 that ran on the model 1 Pis (which have the exact same CPU as the Zero), for java 7 and then 8. There are references here about those going back to 2013. I don't know how long the kept it up beyond that, but last I checked it was gone (and since ARMv6 is not widely used, it is very unlikely to be coming back).goldilocks– goldilocks2019年10月03日 13:31:04 +00:00Commented Oct 3, 2019 at 13:31
-
Searching for 'jdk' does turn out some relevant results: raspberrypi.stackexchange.com/questions/91/… and raspberrypi.stackexchange.com/questions/4683/… but they are a bit dated, the
oracle-java7-jdk
package is no longer in repositories. I think you could manually install it following the same direcitions from oracle.com/technetwork/java/javase/downloads/… though.Fred– Fred2019年10月03日 14:35:13 +00:00Commented Oct 3, 2019 at 14:35 -
Now, its working fine, i degraded java version.Nagaraj– Nagaraj2019年10月04日 05:25:34 +00:00Commented Oct 4, 2019 at 5:25
-
@Nagaraj Please accept the answer with a tick on the tick on the left side on it. This finished your question and show me and others that I don't have to look for a help to you anymore.Ingo– Ingo2019年10月16日 09:20:54 +00:00Commented Oct 16, 2019 at 9:20
I just installed Buster on my old Pi1 B+ and ran into the same problem.
after
sudo apt-get install default-jdk
the JavaVM didn't run.
I removed it and installed
sudo apt-get install java-8-jdk
now it starts.
I ran into the same issue, see Java 11 not working
There doesn't seem to be a Java version for older Pi's and the zero as they use an ARM6 processor, while the newer boards have a 7 or 8 and those are completly different processors.