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

Bug 338212

Summary: [JUnit] JUnit classes cannot be resolved when using built-in JUnit library (space in install directory)
Product: [Eclipse Project] JDT Reporter: Pascal Filion <pascal.filion>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, Olivier_Thomann
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Pascal Filion CLA 2011-02-25 07:51:05 EST
Build Identifier: I20110127-2034

I installed eclipse-java-helios-SR1-win32-x86_64 and I can use the built-in JUnit 3 or 4 library in a Java project, the JUnit classes can be resolved.

If I use eclipse-SDK-3.7M5-win32-x86_64, eclipse-SDK-I20110208-0800-win32-x86_64 or eclipse-SDK-N20110211-2000-win32-x86_64, then the classes are not resolved.

When looking at the "Current Location", it's missing the jar in the path. It's showing
Current location: org.junit_4.8.1.v4_8_1_v20100427-1100 - C:\Program Files\Eclipse\plugins
Source Location: org.junit.source_4.8.1.v4_8_1_v20100427-1100.jar - C:\Program Files\Eclipse\plugins

Reproducible: Always

Steps to Reproduce:
1. Create a Java Project
2. Create a new JUnit Test Case, either v3 or v4
3. Eclipse asks to add JUnit library, say yes

Result: The JUnit classes cannot be resolved
Comment 1 Olivier Thomann CLA 2011-03-09 09:17:02 EST
Moving to JDT/UI.
Might be related to the whitespace inside the eclipse installation folder.
Comment 2 Markus Keller CLA 2011-03-09 10:34:50 EST
> Might be related to the whitespace inside the eclipse installation folder.

Yes. It works without whitespace in the path.
Already broken in 3.7M4. Works in 3.6.2.
Comment 3 Markus Keller CLA 2011-03-09 11:33:09 EST
Created attachment 190774 [details]
Fix
Comment 4 Markus Keller CLA 2011-03-09 11:40:41 EST
Fixed in HEAD for M6.

Thanks for the bug. This was broken since M2, and nobody complained so far.
Comment 5 Pascal Filion CLA 2011-03-10 09:45:49 EST
Thanks for fixing the bug, it works great now.
Comment 6 Markus Keller CLA 2011-03-11 07:03:40 EST
> Thanks for fixing the bug, it works great now.
Yipee!