Bug 223058 - DBCS3.4: Fail to run a Java applicaiton with DBCS class name
Summary: DBCS3.4: Fail to run a Java applicaiton with DBCS class name
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 05:36 EDT by Kentaroh Noji CLA
Modified: 2008-04-22 04:32 EDT (History)
7 users (show)

See Also:


Attachments
error message (21.15 KB, image/jpeg)
2008-03-18 05:36 EDT, Kentaroh Noji CLA
no flags Details
Class with Latin char name (95.05 KB, image/jpeg)
2008-04-04 07:10 EDT, Kentaroh Noji CLA
no flags Details
Class with DBCS name (93.17 KB, image/jpeg)
2008-04-04 07:20 EDT, Kentaroh Noji CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaroh Noji CLA 2008-03-18 05:36:52 EDT
Created attachment 92780 [details]
error message

Build ID: I20080314-1059

Steps To Reproduce:

Description: "Run as" > "Java application" command fails to find a Java class with DBCS name using IBM JDK V6.0

Build date: I20080314
OS: Windows XP/Vista Japanese edition
JRE: IBM JDK V6.0(GM)

Steps:

1. Create a Java project with ASCII name e.g., "ABC". 
File > New > Java project. Enter a Java project name. Then Finish.

2. Create a Java class with DBCS name. 
File > New > Java class for the Java project. Enter a java class name with DBCS characters. Then, Finish.  

3. Run the Java application.
Context menu > Run As > Java Application.

4. Then, error. (Refer to fig1.jpg) 
The error message "java.lang.NoClassDefFoundError" comes up in the console.

Expected output: No error. For instance, IBM JDK V5 does not return any error messages. 

More information:
This problem may happen due to a bug of IBM JDK V6. Had reported this DBCS problem to IBM JDK V6 also.
Comment 1 Olivier Thomann CLA 2008-03-18 11:54:36 EDT
Moving to JDT/Debug
Comment 2 Darin Wright CLA 2008-03-31 15:56:06 EDT

*** This bug has been marked as a duplicate of bug 32206 ***
Comment 3 Kentaroh Noji CLA 2008-04-01 22:24:51 EDT
(In reply to comment #2)
> 
> *** This bug has been marked as a duplicate of bug 32206 ***
> 

This is not the same bug 32206. The bug 32206 happens with four byte characters -  special case.

However, this bug 223058 happens with common double byte characters.

Also, I try the same test case with Latin-1 specific characters such as "юаб"(U+00C0 U+00C1 U+00C2), and the same problem happens. So this problem happens with all non-US ASCII characters such as French, German, Chinese, Japanese etc.

I raised the similar bug to IBM JDK also, and they found that IBM JDK V1.6 (GM) may have a problem in class loader. When I receive a patch of IBM JDK1.6, I try the same test case. If the problem resolved with new patch, I will mark this bug with "NOT_ECLIPSE"

Comment 4 Darin Wright CLA 2008-04-01 22:49:36 EDT
There are these two entries in the Eclipse README.HTML. Perhaps the first entry applies to this case?

(1) Running Java programs with non-Latin-1 characters in package or class names

You get a java.lang.NoClassDefFoundError when running Java programs with non-Latin characters in the package or class names. The workaround is to package the class files as a JAR file and run the program out of the JAR and not from the file system directly. (bug 4181) 

(2) Cannot run or debug class in a project with GB18030 characters in project name

Most class libraries do not properly support the creation of a system process (via java.lang.Runtime.exec(...)) when the specified command line contains GB18030 characters. This limitation means the debugger cannot launch applications when the command line it generates contains GB18030 characters. (bug 32206)

Comment 5 Kentaroh Noji CLA 2008-04-04 07:10:07 EDT
Created attachment 94828 [details]
Class with Latin char name
Comment 6 Kentaroh Noji CLA 2008-04-04 07:19:39 EDT
(In reply to comment #4)

However, I succeeded in running a java application with Latin characters class name in IBM JDK V1.5 (J2RE 1.5.0 IBM Windows 32 build pwi32devifx-20071025 (SR6b).  As well, I can run a java application with DBCS class name in IBM JDK V1.5. So, the test result is dependent on JDK version. I attached screen captures of Latin and DBCS cases. 


Comment 7 Kentaroh Noji CLA 2008-04-04 07:20:24 EDT
Created attachment 94830 [details]
Class with DBCS name
Comment 8 Darin Wright CLA 2008-04-04 10:51:23 EDT
Re-opening.
Comment 9 Mike Wilson CLA 2008-04-11 18:51:35 EDT
Do we believe this is a Debug problem, a JDT problem, something else within Eclipse or NOT_ECLIPSE? Given that whether or not works depends on what VM is being run, I'm tempted to suggest it's NOT_ECLIPSE.

Comment 10 Kentaroh Noji CLA 2008-04-22 04:32:27 EDT
(In reply to comment #9)
I verified that this problem was resolved by a test code of IBM JDK V1.6. Changed the status to NOT_ECLIPSE.