TheThirdOne / rars

RARS -- RISC-V Assembler and Runtime Simulator
Other
1.17k stars 218 forks source link

cannot execute binary file: Exec format error #59

Closed SpasNH closed 4 years ago

SpasNH commented 4 years ago

Hi. Does anyone know what is the problem? I have made the rars1_3_1.jar executable: chmod a+x rars1_3_1.jar

I installed: sudo apt-get install default-jdk java -version openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-post-Debian-1deb10u1) OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Debian-1deb10u1, mixed mode, sharing)

I checked: sudo update-alternatives --config java [sudo] password for edu: There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java Nothing to configure.

Please help. I need rars because I'm following a riscv on openFPGA tutorial. thanks.

ammarfaizi2 commented 4 years ago

@SpasNH you must use java -jar to run the JAR file, not execute it as ELF file like that.

So, run java -jar rars1_3_1.jar.

SpasNH commented 4 years ago

Thank you very much! As you can see, I still have a lot of things to learn! Thank you again.

El mié., 6 nov. 2019 5:47 p. m., Ammar Faizi notifications@github.com escribió:

@SpasNH https://github.com/SpasNH you must use java -jar to run the JAR file, not execute it as ELF file like that.

So, run java -jar rars1_3_1.jar.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheThirdOne/rars/issues/59?email_source=notifications&email_token=ANPZOQ75VUSOWZKPUI5YJSTQSLYKLA5CNFSM4JJTPKLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDHGPWQ#issuecomment-550397914, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPZOQYQFWFGER55SWY65KLQSLYKLANCNFSM4JJTPKLA .

TheThirdOne commented 4 years ago

This seems to be resolved. Thanks @ammarfaizi2 for answering this before I got to it.