7

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?

Fred
  • 4,592
  • 19
  • 29
Nagaraj
  • 119
  • 1
  • 1
  • 5

4 Answers4

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

<blockquote>
  <blockquote>
    <blockquote>
      <p>Select java 8's menu number</p>
    </blockquote>
  </blockquote>
</blockquote>

Java 8 should work just fine thereafter

3

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.

To use OpenJDK:

sudo apt-get update
sudo apt-get install openjdk-7-jdk

To use Java SE Embedded:

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.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
Fred
  • 4,592
  • 19
  • 29
3

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.

1

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.

Frank
  • 328
  • 1
  • 9