This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes static inner 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 "static inner class" Watch "static inner class" New topic
Author

static inner class

mohanasundaram muthukannan
Ranch Hand

Joined: May 29, 2008
Posts: 35
Hi,

I have simple code



i have using eclipse i can directly run this program.

but
i have used console to compile this program javac Main.java

how can i run this program through console?

Thanks in advance
Mohan.M
Shaik Muhammad
Ranch Hand

Joined: Jul 16, 2008
Posts: 36
java Main


Make sure you have set your classpath right.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Shaik Muhammad:
java Main



Did you try this?
mohanasundaram muthukannan
Ranch Hand

Joined: May 29, 2008
Posts: 35
ya i tried.

but

i have this error

Exception in thread "main" java.lang.NoSuchMethodError: main

what can i do?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by mohanasundaram muthukannan:
ya i tried.

but

i have this error

Exception in thread "main" java.lang.NoSuchMethodError: main

what can i do?


hi sorry,i asked question to Shaik Muhammad

use below one
----------------------------------------------
java Main$Staticclass
--------------------------------------------
mohanasundaram muthukannan
Ranch Hand

Joined: May 29, 2008
Posts: 35
Thanks [ ]

Mohana sundaram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static inner class
 
Similar Threads
Help with static method issue
console class is not working
Continious user input
why don't i get the command prompt back when I run my java program from the terminal window?
Object Creation