PRB: Error "Unable to Locate System Class "java\lang\String" (256920)



The information in this article applies to:

  • Microsoft virtual machine

This article was previously published under Q256920

SYMPTOMS

When you try to run a simple Java application with Jview.exe, you may receive the following error message:
Unable to locate system class: java/lang/String

CAUSE

The possible causes for this problem are:
  • The java.lang package is not installed in the Java Package Manager.
  • The java.lang package is not found in the CLASSPATH environment variable.
  • The Microsoft virtual machine (VM) installation may be inconsistent.

RESOLUTION

There are four workarounds to this problem:
  1. Install the latest build of the Microsoft VM.
  2. Uninstall, and then reinstall the latest build of the Microsoft VM.
  3. Run the Clspack utility.
  4. Install Visual J++ version 6.0.

Workaround 1: Install the Latest Build of the Microsoft VM

To resolve this problem, upgrade to (or reinstall) the latest Microsoft VM build from the following Microsoft Web site:

Workaround 2: Uninstall and Then Reinstall the Latest Build of the Microsoft VM

If upgrading does not resolve the problem, perform the following steps:
  1. Download the Microsoft Software Development Kit (SDK) for Java 4.0 from the following Microsoft Web site: This installs the utilities that you need to build and run your Java programs. This also installs the Uninstaller.exe file (the Microsoft VM Uninstaller).
  2. After you download the SDK, run the Uninstaller, which is located in the C:\Program Files\Microsoft SDK for Java 4.0\Bin folder.

    NOTE: This location may vary depending on your installation instructions.
  3. Install the latest Microsoft VM build from the first workaround.

Workaround 3: Run the Clspack Utility

If the problem persists, type the following command at the command prompt:

clspack -auto

and run your project again. For more information on the Clspack utility, see the "References" section.

Workaround 4: Install Visual J++ Version 6.0

If the problem still persists, install Microsoft Visual J++ version 6.0, restart your computer, and then run your project again.

REFERENCES

For more information on the Clspack utility, please refer to the SDK for Java documentation at the following Microsoft Web site: For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbFAQ kbprb KB256920