Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Environment variable not appended by launcher

Andrew,

Please use the latest 1.0 integration build - variable substitution was fixed recently.

Regards,
Alex

----- Original Message -----
From: "Andrew Mickish" <mickish@xxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Tuesday, September 16, 2008 9:40:28 AM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] Environment variable not appended by launcher


Andrei, 

The Eclipse variables do not expand for me. 

I applied your suggestion, and added some print statements in the jruby.bat file to show what values the bat file sees. It seems that ${env_var:CLASSPATH} is used literally. 

CLASSPATH: 
${env_var:CLASSPATH};C:\Workspace\ZooGlue\bin 

THE_CMD: 
"java.exe" -client -Xmx500m -Xss1024k -Xbootclasspath/a:"\jruby-1.1.4\lib\jruby.jar" -classpath "\jruby-1.1.4\bin\lib\bsf.jar;\jruby-1.1.4\lib\jruby.jar;\jruby-1.1.4\lib\profile.jar;${env_var:CLASSPATH};C:\Workspace\ZooGlue\bin" -Djruby.home="\jruby-1.1.4\bin\.." -Djruby.lib="\jruby-1.1.4\bin\..\lib" -Djruby.shell="cmd.exe" -Djruby.script=jruby.bat org.jruby.Main -KU -IC:\Workspace\Zuby -r C:\DOCUME~1\mickish\LOCALS~1\Temp\dltk34108.tmp\scripts\sync.rb C:\Workspace\Zuby\TestTruthiness.rb 


Here are my modifications to jruby.bat to generate the above output: 

echo CLASSPATH: >> D:\TEMP\cp.txt 
echo %CLASSPATH% >> D:\TEMP\cp.txt 

set THE_CMD="%_STARTJAVA%" %_VM_OPTS% -Xbootclasspath/a:"%JRUBY_CP%" -classpath "%CP%;%CLASSPATH%" -Djruby.home="%JRUBY_HOME%" -Djruby.lib="%JRUBY_HOME%\lib" -Djruby.shell="cmd.exe" -Djruby.script=jruby.bat org.jruby.Main %JRUBY_OPTS% %_RUBY_OPTS% 

echo THE_CMD: >> D:\TEMP\cp.txt 
echo %THE_CMD% >> D:\TEMP\cp.txt 

if %JRUBY_BAT_ERROR%==0 %THE_CMD% 



Andrei Sobolev wrote: 

Hi Andrew, 

Append only add new variable if it is not in environment already. 

You could use following variable value and replace style: 
${env_var:PATH};c:\MyRuby\lib 

This will use environment variable PATH available to eclipse and append appropriate path to it. 

Best regards, 
Andrei Sobolev. 


Thanks for the help launching JRuby. I used the Environment tab in the launch configuration dialog to set the CLASSPATH to C:\Workspace\ZooGlue\bin. 

However, this only worked when I selected 'Replace native environment with specified environment'. 

When I selected 'Append environment to native environment', I expected my specified path to be appended to the CLASSPATH variable read by the jruby.bat file. But it was ignored. I added some print statements to jruby.bat to illuminate the CLASSPATH variable that it saw, and it was unaffected by 'Append'. 

Is this a bug, or a misunderstanding? 

_______________________________________________ 
dltk-dev mailing list 
dltk-dev@xxxxxxxxxxx 
https://dev.eclipse.org/mailman/listinfo/dltk-dev 

_______________________________________________ 
dltk-dev mailing list 
dltk-dev@xxxxxxxxxxx 
https://dev.eclipse.org/mailman/listinfo/dltk-dev 

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top