JDK-4904545 : JDK tools fail to work with non-latin characters in the install path
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 1.4.2,6u7
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-08-11
  • Updated: 2014-03-18
  • Resolved: 2014-03-18
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: rmT116609			Date: 08/11/2003


FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
System Locale: "en-ca"
Japanese support is installed.

A DESCRIPTION OF THE PROBLEM :
The os must be set to any english locale and the japanese support must be installed on the system.
If a Japanese (or any non-"windows-1252") charcters are used in the install path the JDK, the tools fail tu run returning the folwoing error:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

The same error occurs if JDK is installed in a directory with only latin characters in the path, and java.exe is used to run a class with a japanese character in the path.

The problem occurs because JVM uses system IO functions that work only with the file names containing system encoding (in this case "windows-1252") characters.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The os must be set to any english locale and the japanese support must be installed on the system.
Install JDK into the default directory "C:\j2sdk1.4.2". Rename the directory to
"C:\j2sdk1.4.2������N", where the last character is any japanese cahracter. Then try to run any tool from "C:\j2sdk1.4.2������N\bin" directory.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The expected result is the tools must work even if I use in the paths characters other than the ones supported by the system's default encoding.
ACTUAL -
The tools fial to run.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
If one wishes to use Japanese characters in directory names, then he must set his system locale to Japanese, for chinese characters - system locale to chinese, etc.
(Incident Review ID: 198691) 
======================================================================

Comments
EVALUATION I don't think this needs to be fixed in the installer. Renaming to java->classes_lang. ###@###.### 2003-08-22 After consulting with the i18n team, this problem will be addressed as part of a larger effort to improve i18n support. ###@###.### 2004-04-27
22-08-2003