jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes ClassNotFoundException using anonymouse inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ClassNotFoundException using anonymouse inner class" Watch "ClassNotFoundException using anonymouse inner class" New topic
Author

ClassNotFoundException using anonymouse inner class

Ragnorok
Greenhorn

Joined: Aug 01, 2001
Posts: 2
- I'm using jdk 1.1.8 to present a dialog for an user name and password, and using anonymous inner classes to handle the AWT events on the dialog. There are three of them, one for the password text field and one each for the "Ok" and "Cancel" buttons. These three anonymous inner classes generate the expected Entrust$< nbr>.class files, one for each, when compiled, and it compiles without error or warning.
- The applet that uses this dialog is served using Notes, and I include all the .class files for it in the applet resource, just like I've always done, including the anonymous inner class files. Now that it has the Entrust$< nbr>.class files the applet throws a ClassNotFoundException, where it does not throw any errors without the dialog code.
- It occurs me, now that I've typed this query, that it's probably a Notes issue, and I should be bothering a Notes forum instead y'all. But one of you may actually know Notes, and have the answer, so I'll leave it here anyway. (shrug)
- From the Java Console of NetScape 4.7:
Netscape Communications Corporation -- Java 1.1.5 Type '?' for options.
Symantec Java! ByteCode Compiler Version 210.065
Copyright (C) 1996-97 Symantec Corporation
java.lang.ClassNotFoundException: Entrust$1
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.ClassNotFoundException.<init>(Compiled Code)
at netscape.applet.AppletClassLoader.findClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
* at java.lang.ClassLoader.loadClassInternal(Compiled Code)
at Entrust.Login(Compiled Code)
at NJSign.Sign(Compiled Code)
- Thanks for your time...
------------------


[This message has been edited by Cindy Glass (edited August 01, 2001).]


(________)<BR> Ragnorok
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Please change your name to be compliant with JavaRanch's naming policy.
Your ID should be 2 separate names with more than 1 letter each. We really want this to be a professional forum and would prefer that you use your REAL name.
Thanks,
Cindy
PS Not a clue. You going to fill us in when you find it?

"JavaRanch, where the deer and the Certified play" - David O'Meara
Ragnorok
Greenhorn

Joined: Aug 01, 2001
Posts: 2
- SOLUTION: It was Notes. In essence, when I embedded the applet using files directly from the file system, rather than in an applet resource, it worked like a charm. Apparently applet resources do not correctly handle inner class files.
- I fail to see how the front page of Java Ranch implies professionalism. I'm certain many here are well versed in Java and it's caveats, and they carry themselves with decorum (born out in posts I've read thus far), but the entire "look and feel" of Java Ranch isn't professionl. It's more off-the-wall, and invites a less draconian, as in much more fun and interesting, approach. A name neither creates nor implies profesionalism, the person behind the name does, and to the best of my knowledge my postings are in line with the desired result.
- Preferences doesn't allow me to change my name, even after clearing cookies. How does one go about about "conforming" at this site, which on surface appears non-conformist?
- I see others who have single names, or last names that don't appear valid, that have been treated with respect and received helpful responses from other users on this forum.
- The response to my post is the only reminder I've seen that has "PS: Not a clue. You going to fill us in when you find it?", implying I'm being singled out in some way. This is not behaviour I would expect from a moderator on a professional forum.
- Since I don't appear to be able to change my name, please delete this account and I will register again when my login attempt with the user name "Ragnorok" fails.
- Thanks for your time...
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Ragnorok,
-Thanks for posting what you found out. It may help someone sometime in the future.
-Whether or not the cows around here imply professional is not really the point. The issue of a naming policy has been discussed alot in the Javaranch forum, but in the end Paul Wheaton makes the rules. And he says 2 names more that 1 letter each.
-Yeah, it's kind of a pain, but you have to just create a different ID that fits the policy. I will ask a sheriff to delete your old one - but don't let that stop you from creating a new one.
-The naming policy was not always here. So the posts from more that a year ago are littered with folks that had non-conforming names. The content is still good.
-I wasn't singling you out in any way. I just didn't want you to think that I wouldn't answer the question based on your name not fitting the policy. I just am not a Notes person. That and I was curious as to the cause, so I was hoping that you WOULD post the answer (thanks again).
-Nah, we will leave this post here for others to read who may have the same concerns as you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassNotFoundException using anonymouse inner class
 
Similar Threads
Cannot view the left frame of admin console
AppletSecurityException
applet works in appletviewer but not in browser
java.lang.VerifyError in Netscape when loading applet
Applet fails before init()