Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338212 - [JUnit] JUnit classes cannot be resolved when using built-in JUnit library (space in install directory)
Summary: [JUnit] JUnit classes cannot be resolved when using built-in JUnit library (s...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-25 07:51 EST by Pascal Filion CLA
Modified: 2011-03-11 07:03 EST (History)
2 users (show)

See Also:


Attachments
Fix (2.38 KB, patch)
2011-03-09 11:33 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!