Article View: csu.cs
Article #47Re: Java applet classpath
From: duggan dieterly
Date: Tue, 28 Mar 2000 00:00
Date: Tue, 28 Mar 2000 00:00
49 lines
2119 bytes
2119 bytes
Okay, Adam, take the ".class" off the "TestApplet.class". Java automatically
adds the .class suffix for you.
Hope this solves the problem.
Adam Carheden <acarheden@careermail.colostate.edu> wrote:
: Mostly Java is a good language, but the #$@*( at Sun really )($#&@ up
: when they invented that whole classpath thing. Here's my problem:
: My applet:
: package TestApplet;
: ...
: public class TestApplet extends applet {...}
: The contentse of my .jar file:
: META-INF/
: META-INF/MANIFEST.MF
: TestApplet/
: TestApplet/TestApplet.class
: My <Applet> tag:
: <applet code="TestApplet.class"
: archive="TestApplet.jar"
: width="300" height="300">
: Your browser sucks!
: </applet>
: My exception using appletviewer:
: load: class TestApplet.class not found.
: java.lang.ClassNotFoundException: java.io.FileNotFoundException:
: http://mydomina.edu/correct/path/to/directory/containing/jar/file/TestApplet/class.class
: What the heck is going on. Why is it looking for class.class. No,
: there is no call to class.class in my TestApplet.java code.
: TestApplet.class works fine outside the .jar file.
: If I try it with a codebase attrib pointing to the TestApplet URL
: instead of an archive attrib in the <Applet> tag, I get:
: java.lang.NoClassDefFoundError: TestApplet (wrong name:
: TestApplet/TestApplet)
: Someone please tell me how to use these @$#) .jar files!
: --
: Adam
: carheden@cs.colostate.edu
Technical Details
Message-ID:
<8bqitc$e8v@faure.cs.colostate.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38DFFA13.DA60954A@careermail.colostate.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 148df6,6a44699ac685f65e X-Google-Attributes: gid148df6,public From: duggan dieterly <dieterly@cs.colostate.edu> Subject: Re: Java applet classpath Date: 2000/03/28 Message-ID: <8bqitc$e8v@faure.cs.colostate.edu> X-Deja-AN: 603441078 Sender: dieterly@faure.cs.colostate.edu References: <38DFFA13.DA60954A@careermail.colostate.edu> X-Trace: 28 Mar 2000 08:25:33 -0700, faure.cs.colostate.edu Organization: Computer Science Department, Colorado State University User-Agent: tin/pre-1.4-980226 (UNIX) (SunOS/5.7 (sun4m)) Newsgroups: csu.cs