Languages

# Archived - WebObjects 5.2: How to Correct the PATH Environment Variable in Windows

This document describes the steps necessary to correct the PATH environment variable when using WebObjects on the Windows 2000 Platform.
This article has been archived and is no longer updated by Apple.
Symptom

There are two known issues when WebObjects is installed on Microsoft Windows 2000.

1. PATH length is exceeded during the installation process.
The maximum length of 255 characters is exceeded resulting in the error message:
"The Path environment variable > 255 chars. This may prevent WebObjects from functioning correctly. The entire variable has been saved and can be edited in the registry at HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment."

2. Location of JDK in the PATH environment variable.
Project Builder will not properly start an application if the JDK path is placed before the Windows system path.

While the Project Builder Panel displays:

> Starting MyApplication.woa
> Finished running MyApplication.woa

MyApplication.woa never starts.

Solution

Issue 1: Exceeding PATH length during installation

1. The WebObjects Installer always prepends the Apple paths to the existing PATH variable. This can result in the Windows system directories getting pushed out of the PATH, and the PATH length may exceed the maximum length of 255 characters.

2. With each repeated installation of WebObjects 5.2, the WebObjects Installer will keep prepending the Apple paths to the existing PATH variable. The consequence is that the PATH variable may contain many duplicate entries, and may exceed the maximum length of 255 characters.

Issue 2: JDK placement in the PATH

WebObjects applications will not work properly on Windows if the JDK path is placed before the Windows system paths.

For example, the following PATH causes issues such as preventing a WebObjects application from running inside ProjectBuilder:

%JAVA_HOME%\\bin;C:\\WINNT\\system32;C:\\WINNT;%NEXT_ROOT%\\Library\\Executables;

where %JAVA_HOME% is defined as C:\\JDK13~1.1

Workarounds

To work around these issues:

1. Check your PATH environment variable.
Choose Settings > Control Panel > System > Advanced > Environment Variables

2. Look at the contents of the PATH environment variable

3. Delete any duplicate entries to ensure that the maximum length is not exceeded

4. Verify that the Windows system path is placed before the JDK path.

Example, of a good working PATH:

%SystemRoot%\\system32;%SystemRoot%; C:\\JDK13~1.1\\bin;

%NEXT_ROOT%\\Library\\Executables;%NEXT_ROOT%\\bin;%NEXT_ROOT%\\Library\\JDK\\bin;

where %SystemRoot% is defined as C:\\WINNT

and %NEXT_ROOT% is defined as C:\\Apple