Code: Select all
Invalid maximum heap size: -Xmx4G
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Code: Select all
Invalid maximum heap size: -Xmx4G
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
TheSenate wrote: ↑Thu Jun 18, 2020 2:32 amSo I'm trying to run Minecraft server for my friends and I to use. I have a Raspberry Pi 4B with 8GB RAM, and I want to dedicate 4 out of the 8 gigs to the server. When I try to do so, the Java output is:I'm assuming this is because the installed version of Java is 32-bit, which is limiting the maximum amount of memory available to the VM. I followed the instructions at viewtopic.php?t=250730 to use the 64-bit kernel, but I'm unsure of how to use a 64-bit installation of Java. Any help would be much appreciated.Code: Select all
Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Wow, sounds promising. So would that let me create the 4GB JVM? Also, is there anything I have to do with my installation of Java (right now, I have default-jdk installed).fruitoftheloom wrote: ↑Thu Jun 18, 2020 8:07 amTheSenate wrote: ↑Thu Jun 18, 2020 2:32 amSo I'm trying to run Minecraft server for my friends and I to use. I have a Raspberry Pi 4B with 8GB RAM, and I want to dedicate 4 out of the 8 gigs to the server. When I try to do so, the Java output is:I'm assuming this is because the installed version of Java is 32-bit, which is limiting the maximum amount of memory available to the VM. I followed the instructions at viewtopic.php?t=250730 to use the 64-bit kernel, but I'm unsure of how to use a 64-bit installation of Java. Any help would be much appreciated.Code: Select all
Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
RaspiOS ARMHF is by default 32bit Kernel and 32bit Userland, changing to the 64bit Kernel it is 64bit Kernel and 32bit Userland.
There is now a a testing version of RaspiOS ARM64 which is 64bit Kernel and 64bit Userland
http://downloads.raspberrypi.org/raspio ... 020-05-28/
bullen,bullen wrote: ↑Tue Jul 21, 2020 1:26 pmI'm struggling with this too, I tried downloading Linux ARM 64 Hard Float ABI: https://www.oracle.com/java/technologie ... loads.html
But it gives HeadlessException!
Where can we find 64-bit Java?
Edit: found it, sudo apt-get install openjdk-11-jdk
msk wrote: ↑Wed Jan 13, 2021 10:46 ambullen,bullen wrote: ↑Tue Jul 21, 2020 1:26 pmI'm struggling with this too, I tried downloading Linux ARM 64 Hard Float ABI: https://www.oracle.com/java/technologie ... loads.html
But it gives HeadlessException!
Where can we find 64-bit Java?
Edit: found it, sudo apt-get install openjdk-11-jdk
I am also trying to install 64 bit java on RPi4, may I know the OS details on which your able to install 64 bit java?
I tried install java 64 bit on raspberry pi 32 bit version, but it failing with error package not found.
Code: Select all
sudo apt update
sudo apt full-upgrade
sudo reboot
Code: Select all
pi@raspberrypi:~ $ java - version
-bash: /opt/jdk1.8.0_191/bin/java: cannot execute binary file: Exec format error
pi@raspberrypi:~ $
I don't know why you would want Java 8, it is past end of life. Liberica works fine on the RaspiOS 64 beta and I'm sure OpenJDK11 would too. OpenJDK and Oracle are using the same code these days so there should be no significant performance difference between them.subw0fer wrote: ↑Tue Feb 23, 2021 7:40 pmThis doesn't work, I don't know why. I downloaded jdk-8u191-linux-arm64-vfp-hflt.tar.gz and installed it, but it gives error, I think something with the version is wrong.
Code: Select all
pi@raspberrypi:~ $ java - version -bash: /opt/jdk1.8.0_191/bin/java: cannot execute binary file: Exec format error pi@raspberrypi:~ $