Solved java: Exec format error

eydaimon

Active Member

Reaction score: 4
Messages: 116

Code:
[~]$ java -version
ELF binary type "0" not known.
exec: /usr/local/linux-oracle-jdk1.8.0/bin/java: Exec format error

[~]$ kldstat
Id Refs Address            Size     Name
 1   35 0xffffffff80200000 1fa7c38  kernel
 2    1 0xffffffff821a9000 30aec0   zfs.ko
 3    2 0xffffffff824b4000 adc0     opensolaris.ko
 4    1 0xffffffff824bf000 21bd0    geom_eli.ko
 5    1 0xffffffff824e2000 b3e8     aesni.ko
 6    1 0xffffffff82621000 a9f1     linprocfs.ko
 7    2 0xffffffff8262c000 7b08     linux_common.ko
 8    1 0xffffffff82634000 389f4    linux64.ko
 9    1 0xffffffff8266d000 2a05     uhid.ko
10    1 0xffffffff82670000 3710     ums.ko
any idea why I get this error? it's been persisting for some time now, and I was hoping it would resolve with some update.
 
OP
eydaimon

eydaimon

Active Member

Reaction score: 4
Messages: 116

Code:
[~]$ sudo brandelf -t linux /usr/local/linux-oracle-jdk1.8.0/bin/java
[~]$ java -version
ELF binary type "3" not known.
exec: /usr/local/linux-oracle-jdk1.8.0/bin/java: Exec format error
 

tobik@

Daemon
Developer

Reaction score: 1,399
Messages: 1,909

linux64 is for 64-bit Linux applications only. java/linux-oracle-jdk18 however is 32-bit, so you'll have to also load linux.ko: kldload linux

Or just put this in /etc/rc.conf which does the right thing without a lot of fuss
Code:
linux_enable="YES"
then service abi restart to load them without a reboot.
 
OP
eydaimon

eydaimon

Active Member

Reaction score: 4
Messages: 116

thank you. and derp. I thought linux_common meant linux had already been loaded.
This was already in my rc.conf but I've noticed that bootpool is unmounted at some point, during startup and then the modules can't be found to be l loaded
 
Top