Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

static inner class  RSS feed

 
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
 
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.
 
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
Boost this thread!