Error Message: Error J0051: Undefined Package 'Java.Lang'

Last reviewed: September 29, 1997
Article ID: Q171631

The information in this article applies to:

  • Microsoft Internet Explorer version 4.0 for Windows 95
  • Microsoft Internet Explorer version 4.0 for Windows NT 4.0

WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.

SYMPTOMS

When you try to compile a Java class using JVC (Microsoft's Java compiler), you may receive the following error message:

   error J0051: Undefined package 'java.lang'

CAUSE

This behavior is caused by the Classes.zip file not being present after you install Internet Explorer 4.0 Platform Preview 2.

RESOLUTION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

NOTE: For information about how to edit the registry, see the online Help in Registry Editor.

To resolve this issue, follow these steps:

  1. Click Start, and then click Run.

  2. Type "clspack -auto" (without quotation marks) in the Open box, and then click OK.

    NOTE: This process can take up to two minutes, and during this time no progress indicator is visible.

  3. Try to compile a Java class using JVC. If you are still unable to compile, continue to the next step.

  4. Use Registry Editor to verify that the key listed below is present. If the key is present, verify that it has the value listed below. If needed, edit the value to match the value listed below. If the key is not present, create it with the value shown here.

          HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM\Classpath
    

             <windir>\java\classes\classes.zip
    
       Note that <windir> is the folder in which you have Windows 95 or
       Windows NT 4.0 installed.
    


Additional query words: 4.00
Keywords : kberrmsg msient msiew95
Version : WINDOWS:4.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.