Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 225391

Summary: [JUnit] Bidi3.4: Unable to Run JUnit Test Cases with Arabic name
Product: [Eclipse Project] JDT Reporter: Ahmed Farrag <afarrag>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: camle, martinae, Olivier_Thomann, Tod_Creasey
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
JUnit Test Case none

Description Ahmed Farrag CLA 2008-04-02 14:07:32 EDT
Build ID: I20070410-1043

Steps To Reproduce:
"ClassNotFoundException" exception is thrown every time an Arabic named JUnit test case is executed. 



More information:
>> Machine locale is Arabic Egypt
>> Workspace encoding is set to UTF-8
>> JVM in use is Sun JDK 1.5
Comment 1 Olivier Thomann CLA 2008-04-02 20:36:02 EDT
Move to JDT/UI
Comment 2 Martin Aeschlimann CLA 2008-04-03 04:33:13 EDT
Can you add the stack trace to the bug?
Comment 3 Ahmed Farrag CLA 2008-04-03 04:53:32 EDT
(In reply to comment #2)
> Can you add the stack trace to the bug?
> 

This is the stack trace of the bug, the problem is that Arabic name of JUnit tests can't be handled. This problem is not encountered on Windows.

Class not found Ç???ÇÑ
java.lang.ClassNotFoundException: Ç???ÇÑ
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:425)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Comment 4 Martin Aeschlimann CLA 2008-04-03 05:27:11 EDT
Are you sure that this 'Sun JDK 1.5' in MacOSX?
Can you print the exact version number?

Can you attach us the test case (maybe put it inside a ZIP to avoid any conversions from bugzilla)?
Comment 5 Ahmed Farrag CLA 2008-04-03 09:34:28 EDT
(In reply to comment #4)
> Are you sure that this 'Sun JDK 1.5' in MacOSX?
> Can you print the exact version number?
> 
> Can you attach us the test case (maybe put it inside a ZIP to avoid any
> conversions from bugzilla)?
> 


This is the exact version number of JVM:

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

The test case will be attached below:

Comment 6 Ahmed Farrag CLA 2008-04-03 09:39:47 EDT
Created attachment 94720 [details]
JUnit Test Case
Comment 7 Markus Keller CLA 2008-04-17 04:03:19 EDT
Works for me under Mac OS X 10.5.2, same VM as comment 5:
- set System Preferences > International > Formats to Egypt (Arabic)
- started I20080415-1646 with a fresh workspace
- set workspace encoding to UTF-8
- imported attached project
=> compile error in &#1575;&#1603;&#1578;&#1576;&#1575;&#1585;.java because the type name could not be parsed. The editor shows them as 6 question marks.

- fixed compile error by copying Arabic file name and pasting it as type name in source
- Run As > JUnit Test works fine
Comment 8 Ahmed Farrag CLA 2008-04-19 16:16:46 EDT
This problem is no longer reproducible in 20080413 build of eclipse. 
Comment 9 Ahmed Farrag CLA 2008-04-19 16:17:09 EDT
Bug fixed, closing...