JDK-4653176 : REGRESSION: NoClassDefFoundError for classes with accent (tilde)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-03-15
  • Updated: 2002-10-08
  • Resolved: 2002-10-08
Related Reports
Duplicate :  
Relates :  
Description

Name: gm110360			Date: 03/14/2002


FULL PRODUCT VERSION :
JDK 1.4 (build 1.4.0-b92)
HotSpot Client (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION : Windows 2000 version 5.0.
Build 2195. Service Pack 2


EXTRA RELEVANT SYSTEM CONFIGURATION :
Locale:  Spanish (Spain)

A DESCRIPTION OF THE PROBLEM :
When you have a class with accents (tildes), like
Aplicaci��nSimple, it is not possible to execute it. You
compile the class, with no problems, and when you try to
execute it, error NoCLassDefFoundError is thrown.

If you use JDK 1.3.x, everything works fine

REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Compile with JDK 1.4
2.Execute with JDK 1.4
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
Obiously, that everything works fine.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main": java.lang.NoClassDefFoundError: Aplicaci��nSimple

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class Aplicaci��nSimple {
  public static void main(String[] args) {
    System.out.println("HelloWorld!");
  }
}
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Not using accents ;o)

Release Regression From : 1.3.1_02
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 143909) 
======================================================================

Comments
SUGGESTED FIX See 4642283 for suggested fix.
11-06-2004

EVALUATION This doesn't appear to be a VM bug. Running under the debugger shows that the application class loader (not the bootstrap class loader in the VM) is throwing the exception; it is being thrown because sun.misc.URLClassPath$FileLoader is making a call to java.io.File.exists() which is returning false. Aside from that the VM appears to be passing the accented name through properly (UTF-8 encoded); otherwise the javac invocation would be failing similarly. ###@###.### 2002-07-18 This is not a vm bug. The problem lies in <java> launcher. We currently do not convert <char* classname> received from the command line to utf8 format and this confuses the vm when it tries to compare the name of the main class it received from the launcher with the one it gets from .class file. This is not a regression either as java.lang.NoClassDefError is produced with 1.4.0 and not with 1.3.1 because this kind of check was put there to fix #4369196. This bug is a duplicate of #4642283. ###@###.### 2002-10-08
08-10-2002

WORK AROUND Do not name your main class using non ASCII characters. If you do wrap the call to your non ASCII main class into some dummy ASCII named main class. ###@###.### 2002-10-08
08-10-2002