I know of one way to not have that happen, but it's memory and resource intensive. The shell command can be run inside a batch file with its own parameters and when that shell exits along with the batch file the parameters passed to that shell also go away. The other time people can get themselves into trouble using shell is by neglecting to make an environment space large enough to hold what they're loading into that environment with the -e switch. It could be Microsoft deprecated the shell command for use in batch files after dos 6.22, but it did work then and there. -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of black ares Sent: Monday, July 12, 2010 0:44 To: programmingblind@xxxxxxxxxxxxx Subject: Re: dos batch files, java and the universe Every modification made to the environment trough a batch file, remain available after the batch file exists. The batch file is in fact only a way to give all commands as a whole, instead giving them one after another each time. ----- Original Message ----- From: "qubit" <lauraeaves@xxxxxxxxx> To: "bprogramming" <programmingblind@xxxxxxxxxxxxx> Sent: Monday, July 12, 2010 5:54 AM Subject: dos batch files, java and the universe > From the recent mail on this list I have gotten the impression that dos > batch files run differently on different versions of windows. > Does this apply to basic syntax and semantics, or is the difference only > in > advanced commands? > > I am trying to write a batch file and am finding dos just similar enough > to > bash to look familiar, but just different enough to trip me up. > What I need is a command to put me in an environment where my java > commands > will work, as well as my own java programs. > I have installed the JDK in > java_home="c:\program files\java\jdk1.6.0_20" > Obviously I need path reset: > set path="%java_home%\bin;%path%" > I also need to set something else like class_path -- if I am remembering > right. > But I have been unable to get this to work. > If anyone has comments, please fill in the blanks. > (But no "blankety blanks" please*smile*) > > Oh, and how do I call a batch file so it is executed within the parent dos > shell? that is, the variables set in the batch file keeps its value after > the batch file exits. > Thx. > --le > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind