What is the command-line equivalent (Linux) of
gcc -o executable file.c
for a jar file? (Java instead of gcc)
I know it is possible to do because at my school, all that is necessary is writing “mars” (the MIPS simulator) in command-line
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To execute a Java JAR file, run the following command, replacing
YourJarFile.jarwith the filename of your JAR file.EDIT: There is no way to execute a Java JAR like
because the Java Runtime Environment must interpret the JAR file, not the operating system’s
sh.