aspose 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Consider Paul's rocket mass heater.
 
subject: problem with Toplevel Nested class
 
Similar Threads
inner class
How do you solve this...??!!
overriding static methods
Why the interviewer challenged me?
Confused about Static Nested Class