Microsoft KB Archive/256920

= PRB: Error "Unable to Locate System Class "java\lang\String" =

Article ID: 256920

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Java 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:

http://www.microsoft.com/mscorp/java/

Workaround 2: Uninstall and Then Reinstall the Latest Build of the Microsoft VM
If upgrading does not resolve the problem, perform the following steps:  Download the Microsoft Software Development Kit (SDK) for Java 4.0 from the following Microsoft Web site:

http://www.microsoft.com/mscorp/java/

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). 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. 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.

