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?

4 Answers 4

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

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.

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

Your Answer

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

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