Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static inner class

 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Main


Make sure you have set your classpath right.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shaik Muhammad:
java Main



Did you try this?
 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya i tried.

but

i have this error

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

what can i do?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks [ ]

Mohana sundaram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic