Forums Register Login

cant find main

+Pie Number of slices to send: Send


compilation executes successfully, yet when running got this:


any help?
+Pie Number of slices to send: Send
Check your jdk installation & classpath!
+Pie Number of slices to send: Send
Your code shows a class named Main. The console screenshot pertains to not being able to locate the class TimeServerPublisher.

You need to tell us
  • the name of the file in which your class code is saved.
  • the exact command you issued to get that error.
  • +Pie Number of slices to send: Send
     

    Darryl Burke wrote:The console screenshot pertains to not being able to locate the class TimeServerPublisher.


    Hendra, the class name you've given to the JVM is TimeServerPublisher.class. That's not a class name though, that's a file name. To run a class the full class name should be given, for the test code that's com.testing.main.Main
    +Pie Number of slices to send: Send
    Others have already pointed this out -- but I thought this should be mentioned.

    This error isn't saying that it can't find main(). This error is saying that the main thread can't find the class at all. The "main" mentioned here is not referring to the main method.

    Henry
    I don't always make ads but when I do they're tiny
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 736 times.
    Similar Threads
    RHE Final #27
    for loop
    Static initialiser
    public class for calling main
    String array with null or """
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 19, 2024 04:57:53.