Forums Register Login

static inner class

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
java Main


Make sure you have set your classpath right.
+Pie Number of slices to send: Send
 

Originally posted by Shaik Muhammad:
java Main



Did you try this?
+Pie Number of slices to send: Send
ya i tried.

but

i have this error

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

what can i do?
+Pie Number of slices to send: Send
 

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
--------------------------------------------
+Pie Number of slices to send: Send
Thanks [ ]

Mohana sundaram
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 982 times.
Similar Threads
why don't i get the command prompt back when I run my java program from the terminal window?
console class is not working
Continious user input
Help with static method issue
Object Creation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:07:18.