File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes problem with Toplevel Nested class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with Toplevel Nested class" Watch "problem with Toplevel Nested class" New topic
Author

problem with Toplevel Nested class

bani kaali
Ranch Hand

Joined: May 05, 2002
Posts: 42
hi,
I am having problem with the code below,I am able to complie the code,but I am unable to run this.


I am gettign the following error --
In class AccessInTopLevelClass:
void main(String argv[]) is not defined

can anyone tell me whats going on and help me with this?

thanks,
bani
[ May 09, 2002: Message edited by: Marilyn deQueiroz ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
In class AccessInTopLevelClass:
void main(String argv[]) is not defined
This is a clever cipher which conceals the fact that the method void main(String argv[]) is not defined in class AccessInTopLevelClass. ! Looking at your code, you do have a main() method, but looking at the parentheses it's actually in AccessInTopLevelClass.NestedTopLevelClass.NestedTopLevelClass1 - a doubly-nested static member class. This is not the same as AccessInTopLevelClass. When you type "java AccessInTopLevelClass", you're telling the JVM to look in that class for a main method. If it can't be found, you can't run your program.


"I'm not back." - Bill Harding, Twister
 
jQuery in Action, 2nd edition
 
subject: problem with Toplevel Nested class
 
Similar Threads
overriding static methods
How do you solve this...??!!
Confused about Static Nested Class
inner class
Why the interviewer challenged me?