Re: problems debugging with package
Petar <[email protected]> Tue, 30 Dec 2003 11:18:55 -0800 (PST)
| Newsgroups | gmane.comp.java.jswat.user |
|---|---|
| Message-ID | <[email protected]> |
Joe, JSwat most definitely works with Java packages. I use it all the time. You are also doing the right thing by specifying fully qualified class name. My guess is that there might be something wrong with your classpath. Is your class standalone or is it in a JAR file? If it is standalone are you pointing to the root of your package hierarchy in your classpath or to the actual directory the class file is in (should be the root of your hierarchy)? Also, are you actually using the word "package" in your package name? This might not be allowed (not sure though) since "package" is a reserved word in Java. If you can send more info somebody might be able to help further. Petar --- Joseph Greenawlt <[email protected]> wrote: > Hi all, > Newbie here. I have downloaded jswat and have gone through the tutorial > without a problem. > However when I try to apply jswat to my application I am running into a > problem because my classes belong to a package. > > So when I put in the class name "ClassName" it finds it and the source > and loads, but when I hit play I get a: > > NoClassDefFoundError: "ClassName (wrong name com/package/name/ClassName)" > [main] ClassLoader.defineClass0 (ClassLoader.java:-1) > > This is because I'm locading ClassName but it won't run because I'm not > calling com.package.name.ClassName, like I have to when I run it from > the command line. > > > However when I put in com.package.name.ClassName I get: > > Source for class not found. Check sourcepath. (Class: > com.package.name.ClassName) > VM running > Exception thrown: ClassNotFoundException: "com.package.name.ClassName" > [main] URLClassLoader$1.run (URLClassLoader.java:199) > > I believe all of this has to do with my class belonging to a package. > Are there any ideas as to how I can work around this without the obvious > compile without a package? > > Thanks in advance, > Joe > > > ======================================================================== > CONFIDENTIALITY NOTICE > ---------------------- > This message, together with any attachments, may be legally privileged > and is confidential information intended only for the use of the > individual or entity to which it is addressed. It is exempt from > disclosure under applicable law including court orders. If you are not > the intended recipient, you are hereby notified that any use, > dissemination, distribution or copy of this message, or any attachment, > is strictly prohibited. If you have received this message in error, > please notify the original sender and delete this message, along with > any attachments, from your computer. > > _______________________________________________ > jswat-user mailing list > [email protected] > http://www.bluemarsh.com/mailman/listinfo/jswat-user