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

Bug 10035

Summary: The Launcher should support variables
Product: [Eclipse Project] JDT Reporter: Markus Kohler <kohler>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: colinml1, eclipse, eric.estievenart, jan, jean-michel_lemieux, jgossage, kari.ikonen, max, nikolaymetchev, olsok, paduffy, skeet
Version: 2.0   
Target Milestone: 3.0   
Hardware: PC   
OS: All   
Whiteboard:

Description Markus Kohler CLA 2002-02-21 03:42:43 EST
My projects often contain data that is necessary to start the application. 
I have for example ini files for configuring the Application. 
When testing the application ( I also have a bunch of Junit tests), I therefore
need to set the workingdirectory to the projectdirectory. 

Since different developers my have their projects on a different drive or
directory  the path for the projectdir is not always the same. It would be much
simpler to just specify the projectdir using a variable (like it's done with
libraries). It would be even better if a path relative to the projectdir could be 
specified. This is because we usally generate our jar files and ini-files to a
directory relative to the project dir. 


You may also consider to make  the project path the default value
for the workingdir. 


Regards,
Markus
Comment 1 Erich Gamma CLA 2002-03-11 09:59:52 EST
Our current story is that a launch config can either be sharable or local. 
Launch configs that depend on local file system paths should not be defined as 
sharable. Variables would increase the reusability shared launch configs. To 
do so the current Classpath variables support could be generalized to 
workspace variables. 

This is not the first request for this. We should get more feedback on this 
once more people are starting to use launch configs.

Moving to Debug.
Comment 2 Darin Wright CLA 2002-05-13 21:46:09 EDT
You can now specify a working directory relative to the workspace or a project. 
See the new changes in the "Arguments Tab" for "Local Java Applications".

*** This bug has been marked as a duplicate of 14977 ***
Comment 3 Markus Kohler CLA 2002-06-03 08:54:22 EDT
How to I specify a working directory relative to the project dir ?
I store my build results above the project dir. If the project is for example 
stored at D:\projects\MyProject then the build results might go to 
D:\_build\MyProject. 

One way to solve the problem could be to create a new project within the
workspace just for the  build results and then reference the working directory
using this project. 
Is this the recommend way to do it ? 
Comment 4 Darin Wright CLA 2002-06-03 09:20:02 EDT
To specify a project relative working directory, you must specify a project 
name (i.e. workspace relative). As suggested, you could create a project for 
this purpose.

We do not intend to add support for variable working directories in 2.0. 
Marking as "Later" for future consideration.
Comment 5 Darin Wright CLA 2003-02-14 13:09:44 EST
*** Bug 31893 has been marked as a duplicate of this bug. ***
Comment 6 Darin Wright CLA 2003-03-03 10:00:10 EST
*** Bug 33663 has been marked as a duplicate of this bug. ***
Comment 7 Darin Wright CLA 2003-05-07 09:57:46 EDT
Re-opening for 3.0
Comment 8 Jared Burns CLA 2003-05-15 11:01:41 EDT
*** Bug 37638 has been marked as a duplicate of this bug. ***
Comment 9 Jared Burns CLA 2003-05-15 16:46:26 EDT
*** Bug 28340 has been marked as a duplicate of this bug. ***
Comment 10 Jared Burns CLA 2003-05-15 16:49:19 EDT
Support for context-specific variables has been moved from the
UI External Tools plugin to the Debug UI plugin (Bug 36930). Once
support for "core variables" has been added to Debug Core (Bug 37241),
I'll add support for variables to launch config types defined in
Debug and JDT Debug.
Comment 11 Jared Burns CLA 2003-05-27 09:34:59 EDT
*** Bug 29971 has been marked as a duplicate of this bug. ***
Comment 12 Jared Burns CLA 2003-06-02 12:43:24 EDT
*** Bug 37891 has been marked as a duplicate of this bug. ***
Comment 13 P Duffy CLA 2003-06-02 15:18:15 EDT
Further suggestions, things we MUST to be able to do within VM args (in psuedo 
Win2K speak).

-DXXX=${project_loc}/a/b/c
-DYYY=%XXX%;/c/d/e
-DPATH=${project_loc}/x/y/x;%PATH%

Comment 14 Jared Burns CLA 2003-08-13 17:52:10 EDT
*** Bug 40311 has been marked as a duplicate of this bug. ***
Comment 15 Darin Wright CLA 2003-08-28 11:48:56 EDT
*** Bug 41855 has been marked as a duplicate of this bug. ***
Comment 16 Darin Wright CLA 2003-10-27 14:22:15 EST
Suggest to add support for variables in

* program args
* vm args
* working directory
Comment 17 Jared Burns CLA 2003-10-28 15:48:30 EST
Added support as specified. Also, filed but 45691 to address UI enhancements to 
make entering variables easier and the feature more apparent.

Please verify the core support for variables in Java configs, DarinW. Changes to 
AbstractJavaLaunchConfigurationDelegate.

NOTE: Please file any requests for variable support in other specific locations 
as separate bugs.
Comment 18 Darin Wright CLA 2003-10-28 16:57:36 EST
Verified (I will file a new bug for a problem I found with the working 
directory).