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

Bug 308746

Summary: If there is a ":" in a folder name in the workspace path, Eclipse gives a (main) classNotFound exception when attempting to execute
Product: [Eclipse Project] JDT Reporter: andrĂ© b <andr55>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description andré b CLA 2010-04-11 06:22:10 EDT
Build Identifier: version 3.5.2 ; build M20100211-1343

A ":" in the workspace path causes Eclipse to not find the main class.
This precludes readily testing the program being developped.

Note that the program will execute normally from the console, if in the program's folder, so the program is successfully compiled by Eclipse when saved.

Note also that if an identical program is created in another workspace without ":" in any of the folder names in the path, then the program can be executed normally from within Eclipse.

Classified as core and not APT since the program compiles correctly.

Note that in Linux most visible special characters can be used in folder names, and they can be very useful to make long names more readable.

Version of Java : JDK 1.6.0_19 SE (Sun) (no other versions installed)
It is very inconvenient to develop a program, only to find that it can't be tested due to this restriction.

Reproducible: Always

Steps to Reproduce:
To produce the error :
1. Create a folder with a ":" in the name.
2. In Eclipse, define a workspace with this folder in the path.
3. Create a very simple Java program, and save it.  ("Hello world" will do.)
4. Execute the program.  ClassNotFound exception results, for class main.

To verify that the program was successfully compiled :
5. In the console, chdir to the project folder, and execute the class file.
6. Works fine.

To show that the same code works if ":" not in any files in the path :
7. In Eclipse, create a workspace at a location not containing any ":" in the folders in the path.
8. Create the identical simple program as in step 3, and save it.
9. Execute it within Eclipse.  Works fine with no ":" in the workspace path.
Comment 1 Remy Suen CLA 2010-04-11 06:34:28 EDT
This seems to be an issue with how applications are launched. I suppose if relative paths were used this wouldn't be a problem.
Comment 2 Olivier Thomann CLA 2010-04-11 08:40:02 EDT
Move to JDT/Debug
Comment 3 Eclipse Genie CLA 2019-11-23 06:55:28 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.