The Java applet does not run when it is moved to the directory structure

advertisements

I wonder if someone can help me with this as I've been going steadily nuts trying to make it work.

There's an existing Java applet which definitely works but I need to move it from its current location at the top of a directory hierarchy to somewhere deep inside it.

The original HTML code to run it was this:

<html>
<applet code=DSVisApp.class
archive="jcommon-1.0.16.jar,jfreechart-1.0.13.jar,
jung-graph-impl-2.0.1.jar, jung-visualization-2.0.1.jar,
gson-1.7.1.jar, jung-algorithms-2.0.1.jar, jung-api-2.0.1.jar,
collections-generic-4.01.jar,colt-1.2.0.jar" name=DSVis height=100%
width=100%>
</applet>
</html>

(I know, I've just inherited it. I want to get it working from the new location with first then worry about switching to <object>.)

And the structure is:

DSVisApp
 + bin
 + + DSVisApp.class
 + + and lots of other classes for this applet
 + src
 + a couple of other directories
jcommon-1.0.16.jar
and all the other jar files with support code

And this works using the HTML above.

Now I want to put it several directory levels down, for example:

alpha
 + beta
 + + gamma
 + + + delta
 + + + + DSVisApp...
 + + + + jar files...

I thought I could just throw in a codebase="/alpha/beta/gamma/delta" but if I do this is what I get:

basic: Added progress listener: [email protected]

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jcommon-1.0.16.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jfreechart-1.0.13.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jung-graph-impl-2.0.1.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jung-visualization-2.0.1.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/gson-1.7.1.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jung-algorithms-2.0.1.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/jung-api-2.0.1.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/collections-generic-4.01.jar

basic: Plugin2ClassLoader.addURL parent called for
http://disco.local/alpha/beta/gamma/delta/colt-1.2.0.jar

network: Cache entry not found [url:
http://disco.local/alpha/beta/gamma/delta/DSVisApp.class, version:
null]
network: Connecting
http://disco.local/alpha/beta/gamma/delta/DSVisApp.class with
proxy=DIRECT
network: Connecting http://disco.local:80/ with proxy=DIRECT
network: Connecting
http://disco.local/alpha/beta/gamma/delta/DSVisApp.class with cookie
"SESS59f29a0af2165ae4a0b5f5e4a22a492a=i2ds99n4hd27qoi2nida5iah67;
has_js=1"
network: Cache entry not found [url:
http://disco.local/alpha/beta/gamma/delta/DSVisApp/class.class,
version: null]
network: Connecting
http://disco.local/alpha/beta/gamma/delta/DSVisApp/class.class with
proxy=DIRECT
network: Connecting http://disco.local:80/ with proxy=DIRECT
network: Connecting
http://disco.local/alpha/beta/gamma/delta/DSVisApp/class.class with
cookie "SESS59f29a0af2165ae4a0b5f5e4a22a492a=i2ds99n4hd27qoi2nida5iah67;
has_js=1"
basic: load: class DSVisApp.class not found.
load: class DSVisApp.class not found.
java.lang.ClassNotFoundException: DSVisApp.class
       at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown
Source)
       at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: DSVisApp.class
Ignored exception: java.lang.ClassNotFoundException: DSVisApp.class
basic: Loading Java Applet Failed...

I don't have much hair anyway - and it hurts tearing it out.

Could it be a server or Java config thing? Because obviously the original version is not pointing at the actual class - the actual class is at DSVisApp/bin/DSVisApp.class)


If you point your browser at http://disco.local/alpha/beta/gamma/delta/DSVisApp.class, what happens?
If your server is set up correctly, you should be prompted to save DSVisApp.class.
I'm guessing you're getting a 404 instead.
That points to a web server configuration issue.