.jar
file, and include/use resources in am executable .jar
file.
.zip
file
containing all of the code necessary to build your
application. Gradescope will only be checking to ensure that your code
complies with the course style guide. Hence, you may only submit
to Gradescope five times. If you can't get your code to comply with
the course style guide within five submissions, you will receive a
grade of 0 on the assignment.
.jar
file named
TextApplication.jar
(that must NOT contain
any of the classes in multimedia2.jar
). Your code
must be compiled to run under Java 21 (not higher).
Gradescope will assign a maximum grade of 25 (based solely on style). Points will then be awarded manually based on the criteria discussed in the previous paragraph.
-source 21
and -target 21
options. In Eclipse, you can accomplish the same thing by setting
the compiler compliance level. See
the Departmental Wiki for help (or search the WWW for the terms
"Eclipse" "java" "compiler" "compliance").
System.out
) in catch
blocks. That's a particularly problematic practice for GUI applications
because they do not have a console.
Instead, you should invoke the showMessageDialog()
method
in the JOptionPane
class, passing it the error messages
you want it to display.
.jar
file and why you might want to do both
at different times.
For help adding the .jar
file containing
the .class
files to an Eclipse project, see the
Departmental Wiki.
TextApplication.mf
)
in TextApplication.jar
that contains something like
the following:
Manifest-Version: 1.2 Main-Class: weatherbitmaps.TextApplication Class-Path: multimedia2.jar(Note: Manifests must end with a newline character.)
TextApplication.jar
file either from an IDE
or from a terminal/shell.
From the command line, you should use a
command something like the following (from the directory above the
.class
files):
jar -cvfm TextApplication.jar TextApplication.mf gui measurement resources weather weatherbitmaps
Obviously, you should understand all of the arguments before you behave like a lemming.
From Eclipse, you should use a process like the one described on the CS Department's wiki.
TextApplication.jar
and multimedia2.jar
to a directory that contains nothing else
(to make sure that those are the only files being used). You could
otherwise be using .class
files or the .txt
file from the local file system and not know it.
You should then be able to click/double-click (depending on your OS) the
executable .jar
file to run the application. (Of course, you
may first have to associate .jar
files with the appropriate
executable, in this case, java
and/or make the file
executable.)
From the command line, you can execute the application using either
java -jar TextApplication.jar
or java -cp TextApplication.jar weatherbitmaps.TextApplication
(because the manifest instructs
the interpreter to use multimedia2.jar
).
Depending on how you read in the weather files, you may need to include the complete path to the file.
Copyright 2025