How to Create JAR File
This wikiHow teaches you how to create a Java compressed folder, also known as a JAR file, using a free Java program called Eclipse. You can do this on both Windows and Mac computers. Make sure that you have the Java Developer's Kit...
Part 1 of 2:
Installing Eclipse
-
How to Create JAR File Picture 1
Make sure that you have the Java Developer's Kit installed. If you don't have the JDK installed on your computer, download and install it on your Windows or Mac computer before continuing. -
How to Create JAR File Picture 2
Open the Eclipse website. Go to https://www.eclipse.org/.- If you already have Eclipse installed on your computer, skip to the next part.
- Click DOWNLOAD. It's a teal button near the top of the page.
-
How to Create JAR File Picture 3
Click DOWNLOAD. This orange button is near the top of the following page. Doing so will prompt Eclipse to download to your computer. -
How to Create JAR File Picture 4
Wait for Eclipse to finish downloading. The download may take a few minutes. -
How to Create JAR File Picture 5
Install the Eclipse installer. To do so:- Windows - Double-click the Eclipse setup file, then click Yes when prompted.
- Mac - Double-click the Eclipse ZIP folder, then wait for the file to extract.
-
How to Create JAR File Picture 6
Open the Eclipse installer. Double-click the purple Eclipse icon when it appears. This will open the Eclipse installer.- If you clicked the Change Mirror link below the orange DOWNLOAD button earlier, Eclipse may instead open to the main program. If so, skip ahead to the "Click Browse" step.
-
How to Create JAR File Picture 7
Click Eclipse IDE for Java Developers. It's the top option in the Eclipse installer. -
How to Create JAR File Picture 8
Click INSTALL. This yellow button is near the bottom of the page. Doing so will prompt Eclipse to begin installing onto your computer.- You can first change the installation folder by clicking the folder icon to the right of the "Installation Folder" field and then selecting a specific folder on your computer.
- If you don't want to install shortcuts for Eclipse, uncheck the shortcut boxes before clicking INSTALL.
-
How to Create JAR File Picture 9
Click LAUNCH when it appears. This green button is at the bottom of the installer window. Clicking it will open Eclipse. -
How to Create JAR File Picture 10
Click Browse…. It's on the right side of the window. A File Explorer (Windows) or Finder (Mac) window will open. -
How to Create JAR File Picture 11
Select a workspace folder. Click a folder that you want to use on the left side of the screen. This is where your Eclipse project files will be stored. -
How to Create JAR File Picture 12
Click Select Folder. It's in the bottom-right corner of the window. -
How to Create JAR File Picture 13
Click Launch. You'll find this at the bottom of the window. Eclipse's main page will open.
Part 2 of 2:
Creating a JAR File
-
How to Create JAR File Picture 14
Place all of your files in one folder. The files that you want to bundle into your JAR file all have to be in the same folder before you can continue. -
How to Create JAR File Picture 15
Click File. It's in the top-left corner of the window (Windows) or in the top-left corner of the screen (Mac). A drop-down menu will appear. -
How to Create JAR File Picture 16
Click Open File…. This option is near the top of the drop-down menu. -
How to Create JAR File Picture 17
Open your files' folder. Go to the folder where the files that you want to use are, then double-click the folder to open it. You should see a list of the files in the window. -
How to Create JAR File Picture 18
Select your folder's contents. Click a file, then press Ctrl+A (Windows) or ⌘ Command+A (Mac) to select all of the files in the folder. -
How to Create JAR File Picture 19
Click Open. It's in the bottom-right corner of the window. Doing so will open your files in Eclipse. -
How to Create JAR File Picture 20
Click File. The File drop-down menu will reappear. -
How to Create JAR File Picture 21
Click Export…. It's near the bottom of the drop-down menu. -
How to Create JAR File Picture 22
Double-click Java. This option is near the top of the page. -
How to Create JAR File Picture 23
Click JAR file. It's below the Java item that you double-clicked.- If you want the JAR file to be executable like a program, click instead the Runnable JAR file option here.
-
How to Create JAR File Picture 24
Click Next. It's at the bottom of the window. -
How to Create JAR File Picture 25
Select resources to export. Click the checkbox next to any unchecked resources that you want to package into your JAR file. You'll do this in the window at the top of the page.- Skip this step if you chose to create a runnable JAR file.
-
How to Create JAR File Picture 26
Select a save location. Click Browse…, type in a name for your file, click a folder in which you want to save the JAR file, and click Save. -
How to Create JAR File Picture 27
Click Finish. Doing so will create your JAR file, though the compression process may take awhile.
4.5 ★ | 2 Vote
You should read it
- How to Download Eclipse
- What is a lunar eclipse? Lunar eclipse occurs when?
- How to Hide a File or Folder from Search Results in Microsoft Windows
- How to Create an Executable File from Eclipse
- How to Zip Folder on Windows
- What is a folder The concept of a file (File) and a folder (Folder) in a computer
- 3 super computers create eclipse eclipses that help you preview the total eclipse tonight
- The strange object appeared in the picture of the lunar eclipse in Hanoi
- What is a solar eclipse? When does a solar eclipse take place?
- Amazing phenomenon - the 'annular eclipse' glows in the sky today
- NASA instructs how to observe a total eclipse safely
- Do you know what a solar eclipse looks from the Moon?