Java

Java Store Java in Action Downloads Help Center

Help Resources
Search Java Help


WJView Error: "Could not find the main class"


This article applies to:
  • Platform(s): Windows 98 ,  Windows ME ,  Windows 2000 ,  Windows XP ,  Windows 2003
  • Browser(s): All Browsers
  • Java version(s): 1.4.2_xx

SYMPTOMS

When you start the computer, you may receive the following error message(s):
  • WJView error: could not execute Main: System can not find the specified file
  • WJView error: unable to locate system class:java/lang/object
  • WJView error: java.lang.NoClassDefFoundError
  • Java Virtual Machine Launcher "could not find the main class: program will now exit".
  • Could not execute Main: The system cannot find the file specified.
  • Unable to locate system class:java/lang/object java.lang.NoClassDefFoundError

CAUSE

WJView.exe or Javaw.exe cannot find the program it is trying to run.
SOLUTION

If this error occurs during startup, it is mostly likely caused by a spyware or adware program which is missing, corrupt, or partially deleted.
  1. Remove Spyware/Adware

    Using your favorite search engine, search for "spyware removal utility" as your search phrase. This search will help you locate many free spyware removal utilities.

    Note: The Spyware Removal Utility can help you get rid of this error message partially. Any new spyware can get itself downloaded to your system later. To get rid of this problem completely, try the second option given below.

  2. Remove WJView entries from Startup

    Wjview lets you view Windows based Java applications. You might receive an error message if Wjview attempts to start an application on your system that no longer exists.

    You may need to modify the system configuration settings to completely get rid of the error. To do so, follow these steps:
    1. Click Start > Run.
      The Run dialog box appears.
    2. Type msconfig.exe.
    3. Click OK.
      The System Configuration Utility dialog box appears.
    4. Select the Startup tab.
    5. Deselect the WJView.exe and/or javaw.exe check boxes that are associated with this problem.
    6. Click OK.
      You will be prompted to restart the computer. Restart the system to apply changes.


    Note: msconfig.exe utility is not available with Windows 2000.


Sun provides third-party contact information to help you find technical support. This contact information may change without notice. Sun does not guarantee the accuracy of this third-party contact information.

Select Language | Java Wear | Newsletter | About Java Technology | Partner with Us | Developers | java.com Changes
Privacy | Terms of Use | Trademarks | License | Disclaimer | Support

Sun Microsystems