Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 278781 - Launching eclipse application fails when a vm arg in eclipse.ini contains a space
Summary: Launching eclipse application fails when a vm arg in eclipse.ini contains a s...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5.1   Edit
Assignee: Ankur Sharma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-02 10:16 EDT by Jonathan Albrecht CLA
Modified: 2009-08-27 11:23 EDT (History)
5 users (show)

See Also:


Attachments
Patch (1.14 KB, patch)
2009-08-06 15:45 EDT, Ankur Sharma CLA
curtis.windatt.public: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Albrecht CLA 2009-06-02 10:16:20 EDT
Build ID: I20090522-1710

Steps To Reproduce:
1. Do a fresh install of Galileo rc2
2. Edit eclipse.ini and add:
-Dmy.home=xxx yyy
to the vmargs
3. launch eclipse and create a new workspace
4. Select the Run Configurations... menu item in the Run menu
5. Create a new Eclipse Application launch configuration
6. Click the Run button to get the error.


More information:
It happens because the vmargs are copied into the launch config vm arguments but are not quoted properly. Properties containing spaces set in eclipse.ini are handled properly by eclipse so if the launch config is to be correct, they will have to be handled there too. 

Quoting the arguments in eclipse.ini has no effect. Changing the property in the launch configuration to either:
-Dmy.home="xxx yyy"
"-Dmy.home=xxx yyy"
seems to fix the problem so maybe quoting all imported vm arguments would fix this bug.

This is the stack trace when trying to launch an eclipse application with -Dmy.home=xxx yyy in the vmargs.

java.lang.NoClassDefFoundError: yyy
Caused by: java.lang.ClassNotFoundException: yyy
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"
Comment 1 Darin Wright CLA 2009-06-02 10:58:22 EDT
Seems like a good 3.5.1 fix. Workaround is to add the quotes manually.
Comment 2 Curtis Windatt CLA 2009-07-17 12:06:20 EDT
Ankur, this could be a slightly larger item to work on.
Comment 3 Ankur Sharma CLA 2009-07-23 16:29:57 EDT
Will do. Please assign it to me.
Comment 4 Chris Aniszczyk CLA 2009-08-05 16:56:12 EDT
ping, 3.5.1 is coming up
Comment 5 Ankur Sharma CLA 2009-08-06 15:45:39 EDT
Created attachment 143709 [details]
Patch

The import vm wizard check for the space inside a vm. if found, enclose the arg in quotes.
Comment 6 Ankur Sharma CLA 2009-08-06 15:49:10 EDT
Curtis, please review the patch. This one is for 3.5.1 so it need to go soon.
Comment 7 Curtis Windatt CLA 2009-08-06 17:27:59 EDT
I like the fix and it works in linux.  I will wait until Monday to put the fix in since M1 hasn't been declared yet.
Comment 8 Curtis Windatt CLA 2009-08-10 11:40:00 EDT
Fixed in HEAD and 3.5.1 maintenance.  Thanks Ankur.
Comment 9 Darin Wright CLA 2009-08-27 11:23:24 EDT
Verified.