Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 208266 - Environment variables not expanded in launch config
Summary: Environment variables not expanded in launch config
Status: RESOLVED DUPLICATE of bug 117748
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 12:05 EDT by DJ Houghton CLA
Modified: 2007-10-31 12:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2007-10-31 12:05:58 EDT
build i1030-0010

Not sure if this is a dup of bug 26620, or it might also be user error.

- create main method that prints out the system args
	public static void main(String[] args) {
		for (int i = 0; i < args.length; i++)
			System.out.println(args[i]);
	}
- create a Java app launch config
- in the Environment tab, create a new variable called "TWO" with the value "two"
- in the Arguments tab, add the following to the program args:
	one ${env_var:TWO} three
- run your app

Note that only one and three are printed to the console. It looked like the environment variables are not used in the substitution. Is this the way it is supposed to work? Or should we be seeing "one two three" printed?
Comment 1 Curtis Windatt CLA 2007-10-31 12:46:05 EDT
A workaround in this case would be to create a new string substitution variable (Preferences > Run/Debug > String Substitution) called TWO with a value of two.  Then in your launch configuration arguments write $TWO.

*** This bug has been marked as a duplicate of bug 117748 ***