Best Answer: How Do I Compile a Jar File in Linux?
Contents

How do I compile a jar file?

Creating a jar File in Command Prompt

  1. Start Command Prompt.
  2. Navigate to the folder that holds your class files: C:>cd mywork.
  3. Set path to include JDK’s bin. …
  4. Compile your class(es): C:mywork> javac *.java.

How do I compile a jar file in Unix?

There are two ways to execute the jar file:

  1. At the DOS or UNIX command prompt, type java -jar myResult. jar . This should work; if it doesn’t, there are two main possibilities: …
  2. Double-click the jar file. This will work if your system has been configured to know about jar files. If not, see below.
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest