JAR file generated - need help understanding console output

I have a JAR file generated for a project capable of being run as an applet. Here's the console output when I try to load the jar file as an applet into a webpage:

Java Plug-in 1.6.0_01

Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM

User home directory = C:\Documents and Settings\Joshua

-

c:clear console window

f:finalize objects on finalization queue

g:garbage collect

h:displaythis help message

l:dump classloader list

m:print memory usage

o:trigger logging

p:reload proxy configuration

q:hide console

r:reload policy configuration

s:dump system and deployment properties

t:dump thread list

v:dump thread stack

x:clear classloader cache

0-5: set trace level to <n>

-

load:class ChessBoardGame.class not found.

java.lang.ClassNotFoundException: ChessBoardGame.class

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadCode(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.io.FileNotFoundException: C:\<snip>\Java\Workspace\BoydChess1.0\ChessBoardGame\class.class (The system cannot find the path specified)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.<init>(Unknown Source)

at java.io.FileInputStream.<init>(Unknown Source)

at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)

at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)

at sun.applet.AppletClassLoader.getBytes(Unknown Source)

at sun.applet.AppletClassLoader.access$100(Unknown Source)

at sun.applet.AppletClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

... 10 more

The JAR file isn't loading properly, and I assume it's related to the "Caused by: java.io.FileNotFoundException: C:\<snip>\Java\Workspace\BoydChess1.0\ChessBoardGame\class.class (The system cannot find the path specified)" line above. I have the entry point set as ChessBoardGame ... but there is no ChessBoardGame directory - only the .java and .class files. I'm not sure what it's attempting to do while running the .jar file, or how to go about fixing it. I'm using Eclipse to create the .jar, and the entry point class ends with a newline. Any help is appreciated.

[2942 byte] By [JJCoolBa] at [2007-11-27 5:38:09]
# 1
By the look of it you've specified in the manifest that the main class is called ChessBoardGame.class. The .class extension is not needed
georgemca at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 2
Here's what my manifest file says..Manifest-Version: 1.0Sealed: trueMain-Class: usa.or.boyd.ChessBoardGame
JJCoolBa at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 3
and here's what my html page says.<applet code=ChessBoardGame.classarchive="BoydChess1.0.jar"width=600 height=400></applet>
JJCoolBa at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 4
Perhaps you need to chnge it to <applet code=ChessBoardGamearchive="BoydChess1.0.jar"width=600 height = 400>
RedUnderTheBeda at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 5

ok. That was kinda it.. I had to change it to code=<path within jar file>/ChessBoardGame.

Anyway it now loads as an applet, but the applet doesn't function the way it does when I run it as an applet out of Eclipse. It doesn't respond to the users actions.

This is my first attempt at turning a project of mine into a .jar file - sorry if these issues are rudimentary.

JJCoolBa at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 6

I think it might be related to the fact that I have some .gif files in the .jar that the applet accesses. Like it can't read the file and gets stuck or something. But I'm not sure why it would do that since the whole point of a .jar file is to pack everything together. Is it a deadlock situation that I'm dealing with, now?

JJCoolBa at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 7

You can no longer access your .gif images as files ie using

java.io.File because they are no longer files: they are entries

in a .jar file.

Most likely, depending on what you are trying to do, you have

to use the Class methods getResource() which returns a URL

or getResourceAsStream() which returns an InputStream.

Typical usage would be: //ImageIcon ic = new ImageIcon("image.gif");

ImageIcon ic = new ImageIcon(getClass().getResource("image.gif"));

This would work if image.gif was in the same directory as the .class

file, regardless of whether a .jar file was being used or not. If

the image is in another directory, consult the API

documentation for Class.

pbrockway2a at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...
# 8
Ahhh.. I see then. Thanks pb. I was thinking that the JVM did an internal unzipping of the .jar to get to the class files, but I see now that must not be how it works. Thanks to all for replying!
JJCoolBa at 2007-7-12 15:11:18 > top of Java-index,Java Essentials,New To Java...