Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. netbeans error main class

netbeans error main class

Scheduled Pinned Locked Moved Java
helpjava
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yashwanth C b
    wrote on last edited by
    #1

    hi i am using netbeans 7.2.1 for my java development . Recently i found that i cant compile the java programs. The compiler shows that "error could not find or load main class". So please help me to solve this problem

    S L S T 4 Replies Last reply
    0
    • Y Yashwanth C b

      hi i am using netbeans 7.2.1 for my java development . Recently i found that i cant compile the java programs. The compiler shows that "error could not find or load main class". So please help me to solve this problem

      S Offline
      S Offline
      Shubhashish_Mandal
      wrote on last edited by
      #2

      This is a common error. Its told you that classes ,you have used in your application, not in project classpath. So make sure that you have add the location of your .class file to your classpath.

      Regards Shubhashish

      1 Reply Last reply
      0
      • Y Yashwanth C b

        hi i am using netbeans 7.2.1 for my java development . Recently i found that i cant compile the java programs. The compiler shows that "error could not find or load main class". So please help me to solve this problem

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You are trying to run a program that has the wrong class name or no class with a public static void main(String [] args) method.

        Use the best guess

        1 Reply Last reply
        0
        • Y Yashwanth C b

          hi i am using netbeans 7.2.1 for my java development . Recently i found that i cant compile the java programs. The compiler shows that "error could not find or load main class". So please help me to solve this problem

          S Offline
          S Offline
          somnathdgaikwad
          wrote on last edited by
          #4

          To compile any class in netbeans you must specify the main() method in file named similar to class.If compiler don`t find that required method it will throw this error.

          1 Reply Last reply
          0
          • Y Yashwanth C b

            hi i am using netbeans 7.2.1 for my java development . Recently i found that i cant compile the java programs. The compiler shows that "error could not find or load main class". So please help me to solve this problem

            T Offline
            T Offline
            tfournier
            wrote on last edited by
            #5

            This link may be of assistance, as you can see there are many possible contributors. Hope this helps. http://frickelblog.wordpress.com/2010/04/30/no-main-class-found/

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups