In addition, avoid the use of the space character in file and directory/folder names because the space character is commonly used as a delimiter.
.zip
file. However, remember that you must
change the suffix to .jmu
or it will be stripped-off
by the JMU email system. This is best done from a command shell because
file explorers have a tendency to hide file extensions.
The documentation for the code developed in the textbook and lectures is available at:
You should create a project named multimedia2
that
contains all of the library source code. It should build on its
own.
You should also create a project named examples
that
contains all of the examples. It will not build on its own, so you
will need to add the other project to its build path. In Eclipse
you can do this using the process
described on the CS Department's wiki.
.class
files) for the "library"
classes are in the following .jar
file:
The code you submit must
work with .class
files
in mutimedia2.jar
. This .jar
file is
also available from the course "Help" page. In Eclipse, you can
incorporate the .jar file into your project using the process
described on the CS Department's wiki.
If you are working from the command line, this .jar
file can be used with "apps" you develop by including it in
your CLASSPATH
. You can either set the environment
variable appropriately or use the -cp
switch when
compiling and executing. For example, under MS-Windows:
javac -cp multimedia2.jar;. MyApp.java java -cp multimedia2.jar;. MyApp
and under Unix/OS-X:
javac -cp multimedia2.jar:. MyApp.java java -cp multimedia2.jar:. MyApp
The byte code (i.e., the .class
files) and
resources for the examples in the textbook and from lectures
are in the following .jar
file:
If you have the two .jar
files in the same drectory/folder,
you can run the examples from a command shell/terminal in MS-Windows
as follows:
java -cp multimedia2.jar;examples.jar ApplicationName arguments
and in Unix/OS-X as follows:
java -cp multimedia2.jar:examples.jar ApplicationName arguments
.class
files
in mutimedia2.jar
. However, when testing and
debugging, you may find that the JApplication
class
in the app
package in mutimedia2.jar
,
which does not display information about exceptions it catches,
does not provide enough information for you to localize
faults. Hence, while testing and debugging, you may want to
include the multimedia2
project (discussed above) in
your build path rather than multimedia2.jar
. You can
then instrument the source code for the JApplication
class in that project. For example, you can add
a call to e.printStackTrace()
in the catch
block
of the invokeInEventDispatchThread()
to see what caused your
application to not start.
Copyright 2023