1

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?

2

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.

  • 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 Oct 3 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 Oct 3 at 14:35
  • Now, its working fine, i degraded java version. – Nagaraj Oct 4 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 Oct 16 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.