0 Replies Latest reply: Mar 5, 2009 12:10 AM by 843804 RSS

    Help Me Urgent...Error: "Could not find the main class. Program will exit."

      Am using Eclipse 3.3.2

      I have a project called: SWDS
      Initially i have JDK1.6 installed in my system. At this time the project is running succesfully.

      But when i removed(uninstalled and environment path also removed) JDK 1.6 and installed JDK 1.5 and path also given.

      No changes are made in the project code.
      When I Run the project SWDS then showing an alert "*Could not find the main class. Program will exit*" and then getting error messages like:

      {color:#ff0000}java.lang.UnsupportedClassVersionError: Bad version number in .class file
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      Exception in thread "main"{color}

      Pleez help me how to rectify this error.