Skip to Main Content
Killer Game Programming in Java
book

Killer Game Programming in Java

by Andrew Davison
May 2005
Intermediate to advanced content levelIntermediate to advanced
998 pages
26h
English
O'Reilly Media, Inc.
Content preview from Killer Game Programming in Java

LoadersTests as a JAR File

It's straightforward to package the LoadersTests code, its images, and sounds into a JAR file:

    jar cvmf mainClass.txt LoadersTests.jar *.class Sounds Images

    jar i LoadersTests.jar

All the class files and everything in the Sounds/ and Images/ subdirectories are packed together.

Tip

The i argument adds indexing information to the JAR file, which will accelerate its execution if it contains many files.

mainClass.txt contains a single line:

    Main-Class: LoadersTests

The JAR file can be started by double-clicking its icon or from the command line:

    java -jar LoadersTests.jar
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Game Development with LibGDX: From Beginner to Professional

Java Game Development with LibGDX: From Beginner to Professional

Lee Stemkoski

Publisher Resources

ISBN: 0596007302Supplemental ContentErrata Page