JDK-6807481 : JVM fails to find JNI DLL in a folder with Unicode chars
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 6u7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-02-19
  • Updated: 2024-04-12
  • Resolved: 2011-04-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The JVM is unable to find a JNI DLL (or class files) when the folder name contains Unicode chars.

THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Download http://java.sun.com/docs/books/tutorial/getStarted/application/examples/HelloWorldApp.java and place into C:\TEST.

2) Open a DOS window and CD into C:\TEST and "javac HelloWorldApp"

3) "java HelloWorldApp" then produces "Hello World!" as expected

4) exit the DOS window and rename C:\TEST to C:\X, where "X" is Unicode character 37329 (decimal).

5) Open a DOS window and CD into the Unicode folder and "java HelloWorldApp", and it now FAILS with "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp".

I can work around this problem (-D java.class.path with 8.3 folder names), but there is a related problem finding JNI DLL's that I can not work around.

Change "HelloWorldApp.java" to depend upon a JNI DLL, place it in the same folder, and verify that it works and can be found when the folder is c:\test.  Then, once again, rename c:\test to a folder name with Unicode chars and the JNI DLL is not found.  Using -D with java.library.path and a 8.3 name to the Unicode folder does.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

---------- END SOURCE ----------

Comments
EVALUATION This is a duplicate of the following bug: 4904545 4/4 JDK tools fail to work with non-latin characters in the install path based on e-mail from Kumar so I'm closing it as such.
05-04-2011