Submitting programs for CS 142

You are expected to submit your labs in .jar files. .jar files are nifty little archive files that java uses to compress it's source. It can also be used in many different way, so we're going to walk you through the way that we need it.

First, make sure that you are completely done with your program. Once you export your program, changes made will not propagate to the .jar file unless you remake it. Once your program is ready, find the package that contains your source code for this lab. Here my package is called lab1 and my source code has a single class called TestClass.

Right click on the package and select export.

export image

Danger Will Robinson! If you right click on the class, only that class will be exported. That's fine for right now because we're only using one class, but latter on with more complicated programs, doing this will only give me parts of your source.

Now that you've done that, a window should pop up that looks like this:

select the jar file

Open the Java folder and select the JAR file with the cute little jar icon. Who said computer people don't have a sense of humor? Click next.

You should then have this screen pop up:



In the box labeled "select the resources to export" you should see your project name (here I named mine Homework) if you open your project you should be able to see all of the packages in your project. Make sure that you have the right package selected and all of the classes of that package. Please don't send me all of your packages, just the one you are submitting.

Next be sure to toggle the Export java source files and resources check box. This is very important.

Give your .jar file a name in the destination field. You may name it anything you like, as long as you remember where it is.

Click Next.



In this next screen, just click Next. We don't need to change anything.



In this screen, we specify the Main class so this JAR can be executable. At the bottom, where it says "Select the class of the application entry point" click Browse. You'll see the following window appear:



You will see a list of the classes in the package you're exporting. Please select the class that is your package starting point. Click OK when you're done.



OK, you're nearly done! Just click "Finish" to create the JAR file.

Using a web browser, open Blackboard and select CS142. Then enter the Course Materials section where you will see each of the programming assignments listed. Follow the link for the correct assignment and find the box for submitting a file with the assignment. Click on the Browse button and navigate until you find the .jar file that you created above. Select this and submit it as your assignment.