Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Packaging Problems

0 views
Skip to first unread message

Tim Sharman

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to t...@dcs.ed.ac.uk, sim...@dai.ed.ac.uk
Hi,

I'm trying to develop a swing applet in Java 1.2 and I seem to have run into a problem when I try
and package up my code.

I basically use two classes, VisionApplet and ImageCanvas both of which reside in the same directory.
They are both members of the same package newjavasrc.iface.utils and both of them compile fine.
However when I try and run VisionApplet.class (which in turn uses ImageCanvas) using the AppletViewer
I get the following error message:

java.lang.NoClassDefFoundError: VisionApplet (wrong name: newjavasrc/iface/VisionApplet)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:404)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(Compiled Code)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:110)
at java.lang.ClassLoader.loadClass(ClassLoader.java:238)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:363)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:532)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:468)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:485)


Now not knowing that much about packages I was wondering if there were any obvious mistakes I could be
making. Everything is being run from the same directory, including the html file which runs the class.

If it makes any difference this is being run under Solaris, and I can get the classes to work fine
when they aren't packaged up.

Any suggestions?

Cheers

Tim
--

Mr. Tines

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
###

On 12 Jul 1999 10:48:00 GMT, in <93177648...@muck.dcs.ed.ac.uk>
t...@dcs.ed.ac.uk (Tim Sharman) wrote.....

> Now not knowing that much about packages I was wondering if there were
any obvious mistakes I could be
> making. Everything is being run from the same directory, including the
html file which runs the class.
>
> If it makes any difference this is being run under Solaris, and I can get
the classes to work fine
> when they aren't packaged up.
>
> Any suggestions?

A class from package com.fred needs to be in directory
com/fred with respect to the codebase or any of the roots
in the classpath.


-- PGPfingerprint: BC01 5527 B493 7C9B 3C54 D1B7 248C 08BC --
_______ {pegwit v8 public key =581cbf05be9899262ab4bb6a08470}
/_ __(_)__ ___ ___ {69c10bcfbca894a5bf8d208d001b829d4d0}
/ / / / _ \/ -_|_-< www.geocities.com/SiliconValley/1394
/_/ /_/_//_/\__/___/@windsong.demon.co.uk PGP key on page

### end pegwit v8 signed text
f2d77583ca96bf12094e01c41739f52e8249a35f33be813b069bce7b727f
51d3e28264529cb0b984529dec5f903c0977a20f760463c29651818ac371


0 new messages