1

hi have tried executing a .jar file using java -jar jarfilename.jar but it just returns:

Error occurred during initialization of VM Server VM is only supported on ARMv7+ VFP

and it returns the same thing if I use the command java version,java -versionorjava --version

Any reason why it doesn't work? (I have a Raspberry Pi Model B Rev 2)

alec
  • 11
  • 2

1 Answers1

2

I have a Raspberry Pi Model B Rev 2

If you mean the (more or less) original single core pi with the yellow RCA and blue 3.5mm jacks, you can't run ARMv7 code.

You'll have to install a java build for ARMv6.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • Yes I do. How would I install the java build for armv6 ? – alec Jul 07 '19 at 14:44
  • Depends on what OS you are using, I guess. You didn't say where you got this version either. It seems to me that the default one in current Raspbian should be okay, but I'm not sure. You might want to edit the output of java --version into your question. The "server vm" is I believe a bit of a different beast than the normal one (which is the "client" version), dunno if that is the reason. – goldilocks Jul 07 '19 at 18:14
  • I downloaded the NOOBS recomended os, it came with java preinstalled. – alec Jul 08 '19 at 09:48
  • NOOBs is actually an installer and not a complete OS, but it includes Raspbian; cat /etc/issue should give something like Raspbian GNU/Linux 10 \n \l. If it's a previous version, you should just replace what's on the card with plain Raspbian. I dunno why they still recommend NOOBS, it seems to cause more trouble for people than anything else. – goldilocks Jul 08 '19 at 16:21
  • So, the fact that java -version returns the same message implies it's the JRE in general. Check which java. Although I think not many people are still using the original B's, the Zeros have the same processor and it so the OS still has to be ARMv6 compatible. – goldilocks Jul 08 '19 at 16:25
  • which java just gives me /usr/bin/java – alec Jul 08 '19 at 21:35
  • That's openJDK then. If the OS is Raspbian 10, that's weird. You could try installing the Oracle JRE if you can find an ARMv6 package -- there used to be one available via Raspbian, but I dunno what happened to that. – goldilocks Jul 08 '19 at 22:15